posva / mande

<700 bytes convenient and modern wrapper around fetch with smart extensible defaults
https://mande.esm.is
MIT License
1.19k stars 42 forks source link

Timeout support #376

Closed Jacknq closed 1 year ago

Jacknq commented 1 year ago

hi, thanks for cool library. Do you plan any timeout feature like axios has? I would find it very handy to have in place, not having custom implementations.

Thanks

posva commented 1 year ago

It would be interesting to add in a tree shakable way. Currently you can pass a signal (like with a native fetch) to implement a timeout:

made('/api').get('/users', { signal: AbortSignal.timeout(200) })