Request
A small wrapper around fetch with interceptors and abort support.
Request
- HTTP methods:
get/post/put/delete GET/DELETEbodies are serialized into the query string;POST/PUTbodies are sent as JSON- every call returns
{ data, abort }—abortis anAbortController
Interceptors
createFetchRequest
Curried helper that binds a Request instance into a one-call fetcher:
Demo
Fetch a user from JSONPlaceholder — pick an id and hit send:
Loading...
