{"id":15519254,"url":"https://github.com/pichillilorenzo/known-http-header-db","last_synced_at":"2026-05-07T06:38:00.327Z","repository":{"id":60387282,"uuid":"542579207","full_name":"pichillilorenzo/known-http-header-db","owner":"pichillilorenzo","description":"HTTP Header Database","archived":false,"fork":false,"pushed_at":"2022-09-29T15:17:43.000Z","size":370,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T02:26:53.450Z","etag":null,"topics":["database","db","header","http","http-header","http-headers","javascript","js","json"],"latest_commit_sha":null,"homepage":"https://pichillilorenzo.github.io/known-http-header-db/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pichillilorenzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.me/LorenzoPichilli"]}},"created_at":"2022-09-28T12:27:58.000Z","updated_at":"2024-10-18T10:31:54.000Z","dependencies_parsed_at":"2023-01-18T21:20:57.059Z","dependency_job_id":null,"html_url":"https://github.com/pichillilorenzo/known-http-header-db","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fknown-http-header-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fknown-http-header-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fknown-http-header-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fknown-http-header-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pichillilorenzo","download_url":"https://codeload.github.com/pichillilorenzo/known-http-header-db/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093181,"owners_count":20722402,"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","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":["database","db","header","http","http-header","http-headers","javascript","js","json"],"created_at":"2024-10-02T10:20:46.280Z","updated_at":"2026-05-07T06:37:55.308Z","avatar_url":"https://github.com/pichillilorenzo.png","language":"TypeScript","funding_links":["https://www.paypal.me/LorenzoPichilli"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# HTTP Header Database\n\n[![NPM](https://nodei.co/npm/known-http-header-db.png?compact=true)](https://nodei.co/npm/known-http-header-db/)\n\u003cbr /\u003e\n[![](https://img.shields.io/npm/dt/known-http-header-db.svg?style=flat-square)](https://www.npmjs.com/package/known-http-header-db)\n\n\u003c/div\u003e\n\n[![NPM Version](https://badgen.net/npm/v/known-http-header-db)](https://npmjs.org/package/known-http-header-db)\n[![license](https://img.shields.io/github/license/pichillilorenzo/known-http-header-db)](/LICENSE)\n[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/LorenzoPichilli)\n\nThis is a large database of known HTTP Headers and information about them. It consists of a single, public JSON file and does not include any logic, allowing it to remain as un-opinionated as possible with an API. It aggregates data from the following sources:\n\n- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers\n- https://www.iana.org/assignments/http-fields/http-fields.xhtml\n- https://en.wikipedia.org/wiki/List_of_HTTP_header_fields\n\n## Installation\n\n```bash\nnpm i --save known-http-header-db\n```\n\n### Database Download\n\nIf you want download the database and use it directly in the browser, you can just grab the\nJSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to\nreplace `main` with [a release tag](https://github.com/pichillilorenzo/known-http-header-db/tags)\nas the JSON format may change in the future.\n\n```\nhttps://cdn.jsdelivr.net/gh/pichillilorenzo/known-http-header-db@main/dist/db.json\n```\n\n## Usage\n\n```js\nimport db from 'known-http-header-db';\n// .. or\nconst db = require('known-http-header-db').default;\n\nconst contentTypeInfo = db['content-type']; // An instance of HTTPHeader\nconsole.log(contentTypeInfo.name); // Content-Type\n```\n\nAccess HTTP Header info using the header name in **lower case** as key.\n\n## Contributing\n\nThe primary way to contribute to this database is by updating the data in one of the upstream sources.\nCheck the `scripts/src/mdn-scraper.ts` to check the MDN scraper implementation.\n\n### Direct Inclusion\n\nIf that is not possible / feasible, they can be added directly here as a \"custom\" header.\n\nTo edit the database, only make PRs against `scripts/src/custom-headers.json`.\n\nThe `scripts/src/custom-headers.json` file is a JSON object of type [HTTPHeaderDb](https://pichillilorenzo.github.io/known-http-header-db/interfaces/HTTPHeaderDb.html), where each `key` is the header name in lower case and the `value`\nis an Object of type [HTTPHeader](https://pichillilorenzo.github.io/known-http-header-db/interfaces/HTTPHeader.html).\n\nTo update the build, run `npm run build:all`.\n\n## HTTPHeaderDb Data Structure Example\n\n```json\n{\n  \"accept\": {...},\n  \"content-type\": {\n    \"name\": \"Content-Type\",\n    \"type\": [\n      \"representation\"\n    ],\n    \"description\": \"The Content-Type representation header is used to indicate the original media type of the resource (prior to any content encoding applied for sending). In responses, a Content-Type header provides the client with the actual content type of the returned content. This header's value may be ignored, for example when browsers perform MIME sniffing; set the X-Content-Type-Options header value to nosniff to prevent this behavior. In requests, (such as POST or PUT), the client tells the server what type of data is actually sent.\",\n    \"syntax\": \"Content-Type: text/html; charset=UTF-8\\nContent-Type: multipart/form-data; boundary=something\",\n    \"link\": \"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type\",\n    \"forbiddenHeaderName\": false,\n    \"corsSafeListedRequestHeader\": false,\n    \"corsSafeListedResponseHeader\": true,\n    \"examples\": [],\n    \"directives\": [\n      {\n        \"name\": \"media-type\",\n        \"description\": \"The MIME type of the resource or the data.\"\n      },\n      {\n        \"name\": \"charset\",\n        \"description\": \"The character encoding standard.\"\n      },\n      {\n        \"name\": \"boundary\",\n        \"description\": \"For multipart entities the boundary directive is required. The directive consists of 1 to 70 characters from a set of characters (and not ending with white space) known to be very robust through email gateways. It is used to encapsulate the boundaries of the multiple parts of the message. Often, the header boundary is prepended with two dashes and the final boundary has two dashes appended at the end.\"\n      }\n    ],\n    \"specifications\": [\n      {\n        \"name\": \"HTTP Semantics # status.206\",\n        \"link\": \"https://httpwg.org/specs/rfc9110.html#status.206\"\n      },\n      {\n        \"name\": \"HTTP Semantics # field.content-type\",\n        \"link\": \"https://httpwg.org/specs/rfc9110.html#field.content-type\"\n      }\n    ],\n    \"browserCompatibility\": [\n      {\n        \"feature\": \"Content-Type\",\n        \"browsers\": [\n          {\n            \"name\": \"Chrome\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Edge\",\n            \"supported\": true,\n            \"version\": \"12\"\n          },\n          {\n            \"name\": \"Firefox\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Opera\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Safari\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Chrome Android\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Firefox for Android\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Opera Android\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Safari on iOS\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"Samsung Internet\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          },\n          {\n            \"name\": \"WebView Android\",\n            \"supported\": true,\n            \"version\": \"Yes\"\n          }\n        ]\n      }\n    ]\n  },\n  \"content-length\": {...},\n  ...\n}\n```\n\nCheck [HTTPHeaderDb](https://pichillilorenzo.github.io/known-http-header-db/interfaces/HTTPHeaderDb.html) for more details.\n\n## License\n\nReleased under the [ISC](/LICENSE) license.\n\nThis project is strongly inspired by the [mime-db](https://github.com/jshttp/mime-db).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fknown-http-header-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpichillilorenzo%2Fknown-http-header-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fknown-http-header-db/lists"}