node-fetch with proxy-agent
npm install node-fetch-with-proxysh
npm install node-fetch-with-proxy
`
Usage
API is the same as node-fetch.
`javascript
const fetch = require('node-fetch-with-proxy');
fetch('http://httpbin.org/get')
.then(res => res.json())
.then(json => console.log(json));
`
Unlike node-fetch, proxy can be set by environment variable.
`sh
export HTTP_PROXY=http://your.proxy:8888
``