Skip to content

HTTP Guardian

HTTP Guardian is a TypeScript HTTP client built around fetch. It makes the API layer explicit: authentication, parsing, cache, guards, notifications, and observability go through one pipeline instead of being scattered across components.

This documentation is written for teams integrating the package into a frontend application, an SDK, or a modern Node runtime. It favors readable configuration and behaviors with no hidden assumptions.

Install View npm packages

HTTP Guardian pipeline

Quick Facts

Runtime fetch + TypeScript

Node >= 22

Contract ClientResult<T>

Mode Promise, optional RxJS

  1. Read the concepts to understand the pipeline.
  2. Declare one client per API with HttpClientOptions.
  3. Set up authentication with auth helpers.
  4. Set per-call options with RequestOptions.
  5. Add guards and plugins only when the behavior is actually needed.

Main Packages

Core

@cedvict/http-guardian

Fetch client, auth, parsers, cache, guards, notifications, and public types.

npmjs.com

RxJS

@cedvict/http-guardian-rx

Observable adapter that keeps the same result contract.

npmjs.com

Plugins

retry, timeout, logger, Sentry, OTel

Optional extensions for cross-cutting policies and observability.

See the list

Documentation Sources

This documentation consolidates package READMEs, exported TypeScript contracts, and integration decisions around HTTP Guardian. It is not a marketing page: every section should help configure or diagnose a concrete use case.