ky
JavaScript HTTP client based on the browser Fetch API
... search parameters in the input URL. After prefixUrl and input are joined, the result is resolved against the base URL of the page (if any). The hook can return a Request to replace the outgoing request, or return a Response to completely avoid making an HTTP request. This can be used to mock a request, check an internal cache, etc. An important consideration when returning a request or response from this hook is that any remaining beforeRequest hooks will be skipped.