0.5.0 • Published 2 years ago

@vatr/fetch v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@vatr/fetch

Enhanced fetch API with the timeout, helper methods, and types written in tiny TypeScript, ES module.

Options

Options inherited from the RequestInit. you can watch all documents of the parameters RequestInit in fetch init parameters

Options have two other parameters:

  • bodyObject: a JSON object that converts to string and put on the body.
  • queryParameters: a JSON object that converts to URL query params

Example usage

import {getJson} from 'https://esm.run/@vatr/fetch';

const productList = await getJson('/api/products', {limit: 10}, {timeout: 5_000});
0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago