Optional
params: FfetchOptions & TimeoutAddon & QueryAddon & FormAddon & MultipartAddon & RetryAddonshorthand for making a DELETE request
extend the base options with the given options
note: addons, middlewares and headers will be merged with the base options, the rest of the options will be overridden
shorthand for making a GET request
shorthand for making a HEAD request
shorthand for making an OPTIONS request
shorthand for making a PATCH request
shorthand for making a POST request
shorthand for making a PUT request
the default ffetch instance with a reasonable default set of addons
you can use this as a base to create your project-specific fetch instance, or use this as is.
this is not exported as
ffetch
because most of the time you will want to extend it, and exporting it asffetch
would make them clash in import suggestions, and will also make it prone to subtle bugs.Example