Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

http-header-fields-typed

coderslagoon1.1kMITdeprecated1.3.0TypeScript support: included

Package no longer supported. Contact support@npmjs.com for more info.

HTTP header fields definitions, including common non-standard ones.

readme

http-header-fields-typed

Collect them all HTTP header fields definitions, including common non-standard ones.

Installation

npm

npm install --save http-header-fields-typed

yarn

yarn add http-header-fields-typed

Usage

TypeScript

import HttpHeaderFields from "http-header-fields-typed";
console.log(HttpHeaderFields.CONTENT_LENGTH);

// Example for how to set a header using the definitions ...
res.writeHead(HttpStatus.INTERNAL_SERVER_ERROR, {
    [HttpHeaderFields.CONTENT_TYPE]: "text/plain",
});

JavaScript

var HttpHeaderFields = require('http-header-fields-typed').default;
console.log(HttpHeaderFields.CONTENT_LENGTH);