@hex-di ecosystem
HTTP Client
Type-Safe HTTP Client for TypeScript
Get Started
npm install @hex-di/http-client
:: features
Why HTTP Client?
Type-Safe Requests
Request and response types are validated at compile time. No runtime surprises.
Interceptors
Request and response interceptors for auth tokens, logging, and error transformation.
Retry Policies
Configurable retry with exponential backoff, jitter, and circuit breaking.
Port-Based
HTTP Client is a port. Swap between fetch, Axios, or a test mock with zero changes.
Request Deduplication
Identical in-flight requests are merged. Save bandwidth and reduce server load.
Timeout Management
Per-request and global timeouts with abort controller integration.
:: ecosystem
Part of the HexDI Stack
HTTP Client integrates seamlessly with the HexDI dependency injection ecosystem. Use it standalone or compose it with other libraries.
Explore HexDI