Skip to content

Foundatio FetchClientTyped, ergonomic fetch for JS/TS

JSON helpers, caching, middleware, rate limiting, and great DX

Foundatio

Quick Example

ts
import { FetchClient } from "@foundatiofx/fetchclient";

type Products = { products: Array<{ id: number; name: string }> };

const client = new FetchClient();
const res = await client.getJSON<Products>(
  `https://dummyjson.com/products/search?q=iphone&limit=10`,
);

console.log(res.data?.products.length);

Released under the MIT License.