Skip to content

snoguchi/node-fetch-with-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-fetch-with-proxy

Thin wrapper of node-fetch that can be used behind the proxy.

Install

npm install node-fetch-with-proxy

Usage

API is the same as node-fetch.

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.

export HTTP_PROXY=http://your.proxy:8888

Environment variables are only valid for Node.js. Note that the browser uses its own proxy settings instead.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published