HTTP Constants for TypeScript
JSON →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'.
Traffic · last 30 days ↑13% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇪🇸 Spain