next-spider-fetch
Fetch special for spider.
installation
npm install -S @jswork/next-spider-fetch
usage
import '@jswork/next-spider-fetch';
nx.spiderFetch('https://api.github.com/users/afeiship')
.then(res=>res.json())
.then(res=>{
console.log(res);
});
options
name | type | description |
---|---|---|
timeout | Number | Timeout for fetch. |
delay | Number | Request with delay. |
proxy | String | Set proxy for request. |
debug | Boolean | If debug the options. |
license
Code released under the MIT license.