itty-fetcher
itty-fetcher copied to clipboard
An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!
# Changelog - PROPOSED: allow `fetcher` to call methods directly, without calling it previously. - PROPOSED: allow `fetcher` methods to omit path as 1st argument, if empty
I was trying to pass `{ credentials: 'include' }` for CORS stuff but it seems like these aren't passed when declaring a fetcher instance... being able to do this would...
```ts fetcher().get('/foo', { bar: ['a', 'b'] }) ``` Should result in `/foo?bar=a&bar=b` but instead results in `/foo?bar=a,b` because the array is just being stringified. I believe it is because of...
I am finding scenarios where I generally want auto-parsing but sometimes I need access to the response object. I would prefer to just pass `autoParse: false` on those specific calls....