You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight fetching library packed with essential features - retries, interceptors, request deduplication and much more, all while still retaining a similar API surface with regular Fetch.
CallApi Fetch is an extra-lightweight wrapper over fetch that provides quality of life improvements beyond the bare fetch api, while keeping the API familiar.
It takes in a url and a request options object, just like fetch, but with some additional options to make your life easier. Check out the API Reference for a quick look at the additional options.
Then you can use it by importing it in your JavaScript file.
import{callApi}from"@zayne-labs/callapi";
Using CallApi without npm
You can import callApi directly into JavaScript through a CDN.
To do this, you first need to set your script's type to module, then import callApi.
<scripttype="module">import{callApi}from"https://esm.run/@zayne-labs/callapi";</script><!-- Locked to a specific version --><scripttype="module">import{callApi}from"https://esm.run/@zayne-labs/callapi@1.8.9";</script>
About
A lightweight fetching library packed with essential features - retries, interceptors, request deduplication and much more, all while still retaining a similar API surface with regular Fetch.