{"id":15434298,"url":"https://github.com/httpland/http-middleware","last_synced_at":"2025-12-24T21:55:34.228Z","repository":{"id":65838163,"uuid":"601048398","full_name":"httpland/http-middleware","owner":"httpland","description":"HTTP middleware specification","archived":false,"fork":false,"pushed_at":"2023-03-16T07:43:22.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T20:40:51.339Z","etag":null,"topics":["fetch","fetch-api","http","http-middleware","middleware","request","response","spec","specification"],"latest_commit_sha":null,"homepage":"https://deno.land/x/http_middleware","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/httpland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T08:59:40.000Z","updated_at":"2024-01-22T08:29:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"64b26af7-3009-4fa6-839c-96ce54563b47","html_url":"https://github.com/httpland/http-middleware","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/httpland/http-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Fhttp-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Fhttp-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Fhttp-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Fhttp-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httpland","download_url":"https://codeload.github.com/httpland/http-middleware/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Fhttp-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006846,"owners_count":26084206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fetch","fetch-api","http","http-middleware","middleware","request","response","spec","specification"],"created_at":"2024-10-01T18:38:41.948Z","updated_at":"2025-10-11T10:31:41.135Z","avatar_url":"https://github.com/httpland.png","language":"TypeScript","readme":"# http-middleware\n\nHTTP middleware specification\n\n## What\n\nDefine standard HTTP middleware specifications. This is intended to increase the\ninteroperability of the HTTP library's own middleware.\n\nIt consists only of the web standards stack and is compatible with many\nbrowsers.\n\n## Terms\n\n\u003cdl\u003e\n\u003cdt\u003eUpstream\u003c/dt\u003e\n\u003cdd\u003eRefers to HTTP requests forwarded from the client to the server.\u003c/dd\u003e\n\n\u003cdt\u003eDownstream\u003c/dt\u003e\n\u003cdd\u003eRefers to the HTTP response forwarded from the server to the client.\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Interface\n\nMiddleware interfaces can be defined in TypeScript as follows:\n\n```ts\ninterface Middleware {\n  (request: Request, next: Handler): Response | Promise\u003cResponse\u003e;\n}\n\ninterface Handler {\n  (request: Request): Response | Promise\u003cResponse\u003e;\n}\n```\n\n## Features\n\n`Middleware` has the following features:\n\n- Compliant with [Fetch API](https://fetch.spec.whatwg.org/).\n- Compliant with `Handler`.\n\n  `Handler` is a powerful interface for handling HTTP requests. The `Middleware`\n  is purely an extension and compatibility with `Handler`.\n\n- It is a pure function.\n\n  `Middleware` is a pure function that returns a value. Implementations are\n  expected to have no side effects.\n- It is self-contained.\n- It can handle upstream.\n- It can handle downstream.\n- It can handle next handler.\n\n## Implementation\n\nSee [chain-handler](https://github.com/httpland/chain-handler) for a concrete\nimplementation that can handle middleware\n\n## License\n\nCopyright © 2023-present [httpland](https://github.com/httpland).\n\nReleased under the [MIT](./LICENSE) license\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpland%2Fhttp-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttpland%2Fhttp-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpland%2Fhttp-middleware/lists"}