Skip to content

AllyMurray/http-client-toolkit

Repository files navigation

HTTP Client Toolkit

A modular HTTP client toolkit with pluggable caching, deduplication, and rate limiting. Each concern is implemented as a standalone store that can be used independently or composed together.

Documentation

Packages

Package Description
@http-client-toolkit/core HTTP client and store interfaces
@http-client-toolkit/store-memory In-memory store implementations
@http-client-toolkit/store-sqlite SQLite-backed store implementations
@http-client-toolkit/store-dynamodb DynamoDB-backed store implementations
@http-client-toolkit/dashboard Dashboard UI for monitoring stores

Quick Start

npm install @http-client-toolkit/core @http-client-toolkit/store-memory
import { HttpClient } from '@http-client-toolkit/core';
import {
  InMemoryCacheStore,
  InMemoryDedupeStore,
  InMemoryRateLimitStore,
} from '@http-client-toolkit/store-memory';

const client = new HttpClient({
  name: 'example-api',
  cache: new InMemoryCacheStore(),
  dedupe: new InMemoryDedupeStore(),
  rateLimit: new InMemoryRateLimitStore(),
  cacheTTL: 300,
});

const data = await client.get<{ name: string }>(
  'https://api.example.com/user/1',
);

Every store is optional. Use only what you need.

Requires Node.js >= 20.

Development

pnpm install
pnpm build
pnpm test
pnpm lint

License

ISC

About

A modular toolkit for building resilient HTTP clients. Provides pluggable caching, adaptive rate limiting, request deduplication, and more. Use the full client or just the pieces you need.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors