1.0.0 • Published 6 years ago

axios-proxy-tunnel v1.0.0

Weekly downloads
81
License
MIT
Repository
github
Last release
6 years ago

AXIOS-PROXY-TUNNEL

styled with prettier Greenkeeper badge Travis Coveralls Dev Dependencies

Create HTTPS tunnel through HTTP proxies (like corporate proxies)

Here is an example :

import axios from 'axios';
import axiosProxyTunnel from 'axios-proxy-tunnel';

const myInstance = axiosProxyTunnel(axios.create());

And if you use an HTTP proxy (by setting proxy configuration, or by using environment vars), the package will change the httpsAgent, to use a tunnel .

Internally, this library use interceptors, if you want to change configuration with interceptors too, please use like this :

import axios from 'axios';
import axiosProxyTunnel from 'axios-proxy-tunnel';

const myInstance = axios.create();

//all you want to do with your instance

axiosProxyTunnel(myInstance);

For the moment, this library is just adapted to my needs, and maybe not ready in your cases . If you have ideas/problems, please create issue/PR

1.0.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago