Skip to content

HTTP Client Toolkit

Modular HTTP client middleware with pluggable caching, request deduplication, and adaptive rate limiting — backed by swappable storage backends

Pluggable Stores

Swap between in-memory, SQLite, and DynamoDB backends without changing application code.

Adaptive Rate Limiting

Priority-aware rate limiter that dynamically shifts capacity between user and background requests.

Request Deduplication

Automatic dedup ensures only one in-flight request per unique key — concurrent callers share the result.

TypeScript First

Strict TypeScript with full type safety, generics, and Zod runtime validation.

import { HttpClient } from '@http-client-toolkit/core';
import {
InMemoryCacheStore,
InMemoryDedupeStore,
InMemoryRateLimitStore,
} from '@http-client-toolkit/store-memory';
const client = new HttpClient(
{
cache: new InMemoryCacheStore(),
dedupe: new InMemoryDedupeStore(),
rateLimit: new InMemoryRateLimitStore(),
},
{ defaultCacheTTL: 300 },
);
const data = await client.get<{ name: string }>(
'https://api.example.com/user/1',
);
  • Core — HTTP client engine, store interfaces, and request hashing
  • Memory — In-memory stores with LRU eviction — zero dependencies
  • SQLite — Persistent stores via better-sqlite3 and Drizzle ORM
  • DynamoDB — Distributed stores for serverless and multi-instance deployments
  • Node.js 20+
  • TypeScript 5.0+ (for TypeScript projects)

Installation

Install the core package and pick a store backend. Get Started →

API Reference

Explore the HttpClient API and store interfaces. Browse API →

Guides

Learn caching, dedup, rate limiting, and error handling patterns. Read Guides →