Skip to content

fetchclient 1.0.1-alpha.0.7

Install from the command line:
Learn more about npm packages
$ npm install @foundatiofx/fetchclient@1.0.1-alpha.0.7
Install via package.json:
"@foundatiofx/fetchclient": "1.0.1-alpha.0.7"

About this version

Foundatio Foundatio

NPM JSR Build status Discord

FetchClient is a tiny, typed wrapper around fetch with JSON helpers, caching, middleware, rate limiting, timeouts, and friendly error handling.

Install

npm install @foundatiofx/fetchclient

Quick Example

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

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

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

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

Documentation


MIT © Foundatio

Details


Assets

  • fetchclient-1.0.1-alpha.0.7.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0