# @readme/http-headers

> Retrieve HTTP Header descriptions from MDN.

Latest version **2.0.0** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @readme/http-headers
pnpm add @readme/http-headers
yarn add @readme/http-headers
bun add @readme/http-headers
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-11-19 |
| First published | 2023-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 199.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 401 |
| Author | Gabe Ratcliff |
| Maintainers | gkoberger, domharrington, mjcuva, jonursenbach, rafegoldberg, darrenyong |
| Keywords | http |

## Links

- npm: https://www.npmjs.com/package/@readme/http-headers
- Repository: https://github.com/readmeio/oas
- Homepage: https://github.com/readmeio/oas#readme
- Issues: https://github.com/readmeio/oas/issues
- npm.io page: https://npm.io/package/@readme/http-headers

## Recent versions

- 2.0.0 (latest) — 2026-11-19
- 1.0.0 — 2025-11-11
- 0.0.4 — 2023-09-15
- 0.0.3 — 2023-08-21
- 0.0.2 — 2023-08-21
- 0.0.1 — 2023-08-16

## README

# @readme/http-headers

Utility to find descriptions for HTTP headers.

[![npm](https://img.shields.io/npm/v/@readme/http-headers)](https://npm.im/@readme/http-headers) [![Build](https://github.com/readmeio/oas/workflows/CI/badge.svg)](https://github.com/readmeio/oas/tree/main/packages/http-headers)

<a href="https://readme.com">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/readmeio/.github/main/oss-header-dark.png">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/readmeio/.github/main/oss-header.png">
  <img alt="ReadMe Open Source" src="https://raw.githubusercontent.com/readmeio/.github/main/oss-header.png">
</picture>
</a>

## Installation

```sh
npm install --save @readme/http-headers
```

## Usage

This library retrieves header descriptions directly from [MDN's header documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).

```ts
import { getHeader } from '@readme/http-headers';

// A typical header
console.log(getHeader('Connection'));
/**
{
  description: 'Controls whether the network connection stays open after the current transaction finishes.',
  link: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection',
}
*/

// A header with a Markdown-flavored description
console.log(getHeader('Cookie'));
/**
{
  description: 'Contains stored HTTP cookies previously sent by the server with the Set-Cookie header.',
  link: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie',
  markdown: 'Contains stored [HTTP cookies](/en-US/docs/Web/HTTP/Cookies) previously sent by the server with the "Set-Cookie" header',
}
*/

// A header with additional decorations
console.log(getHeader('DPR'));
/**
{
  deprecated: true,
  experimental: true,
  description: 'Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel.',
  link: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/DPR',
}
*/
```

---
_Source: https://npm.io/package/@readme/http-headers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
