@albi_scando/as-const-http-lib
v1.0.0
Published
A TypeScript library providing strongly typed HTTP-related constants.
Readme
as-const-http-lib
Description
A lightweight, strongly-typed TypeScript library providing HTTP constants with full type safety. Leverage TypeScript's as const pattern to get zero-runtime overhead, perfect IDE autocompletion, and compile-time type checking for HTTP headers, request methods, and response status codes.
Never worry about typos in HTTP headers, methods, or status codes again—catch errors at compile time instead.
What's Included
- HTTP Headers — 80+ standardized headers with modern support (CSP, HSTS, Client Hints, etc.)
- HTTP Methods — All 9 standard request methods with MDN documentation links
- Status Codes — Complete 1xx–5xx response codes organized by category
Why Use This?
✓ Type-Safe — as const pattern ensures literal types at compile time
✓ Zero Runtime Overhead — Constants are tree-shakeable and lightweight
✓ Developer Experience — Full IDE autocompletion and intellisense support
✓ Standards Compliant — Covers modern HTTP specifications
✓ Simple & Focused — No bloat—just the constants you need
