npm.io
0.1.0 • Published 8 years ago

env-proxy-agent

Licence
MIT
Version
0.1.0
Deps
2
Vulns
0
Weekly
0
Stars
4

env-proxy-agent

Maps environment variables to http.Agent implementations using proxy-from-env and proxy-agent.

Example

import fetch from 'node-fetch';
import envProxyAgent from 'env-proxy-agent';

const endpoint = 'https://api.github.com/graphql';
fetch(endpoint, {
  agent: envProxyAgent(endpoint),
});