HTTP Constants for TypeScript

JSON →
library 1.0.8 ·javascript
verified May 27, 2026

The `http-constants-ts` library provides a comprehensive collection of standardized and commonly used non-standard HTTP constants, including headers, MIME types, tracking statuses, HTTP methods, content encodings, CSP directives and sources, HTTP response codes, and Cache-Control instructions. Currently stable at version 1.0.8, its release cadence is typically slow, reflecting the stable nature of HTTP specifications, with updates primarily driven by new RFCs or significant industry changes. A key differentiator is its TypeScript-first design, offering strong type safety and predictable access patterns through structured objects like `Headers.STRICT_TRANSPORT_SECURITY` or `MimeTypes.Application.JSON`. It ensures consistency by normalizing constant values: headers are capitalized (e.g., `Strict-Transport-Security`), MIME types, content encodings, and cache-control instructions are lowercase (e.g., `application/json`, `deflate`, `max-age`), and HTTP methods are uppercase (e.g., `POST`), reducing the chance of runtime errors from 'magic strings'.

total hits 23
actors 8 distinct systems
last hit 3d ago human
Amazonbot
4
ByteDance
4
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇪🇸 Spain