@jswork/next-fetch-with-timeout
v1.0.13
Published
Fetch with timeout options.
Downloads
36
Readme
next-fetch-with-timeout
Fetch with timeout options.
installation
npm install -S @jswork/next-fetch-with-timeout
usage
import '@jswork/next-fetch-with-timeout';
const betterFetch = nx.fetchWithTimeout(fetch);
betterFetch('https://api.github.com/users/afeiship').then(res=>res.json()).then(res=>{
console.log(res);
})
license
Code released under the MIT license.