⚡
Typed Responses
Full TypeScript support for strongly-typed JSON results.
JSON helpers, caching, middleware, rate limiting, and great DX
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);