Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.37 KB

File metadata and controls

33 lines (24 loc) · 1.37 KB

Changelog

All notable changes to this project are documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Added

  • fetchJson<T>(input, init?) — resilient fetch + JSON in one call: retries like fetchwise, throws HttpError on a non-2xx status (no silently-parsed error pages), returns typed JSON, and serializes a json body (setting Content-Type + POST). 204 → undefined.
  • HttpError class carrying status and the Response.

Added

  • Initial release.
  • fetchwise(input, init?) — drop-in resilient fetch with retries.
  • Exponential backoff with full jitter, configurable minDelay / maxDelay / factor.
  • Per-attempt timeout built on AbortController.
  • Retry-After header support (seconds and HTTP-date).
  • Configurable retryOnStatus and retryOnError policies.
  • onRetry hook with retry context.
  • create(defaults) factory for preconfigured clients.
  • parseRetryAfter and TimeoutError exports.
  • Ships ESM + CJS with full TypeScript types.