2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Support proxy auth (#483)

* Adding proxy auth
This commit is contained in:
Marc Mignonsin
2016-10-19 11:02:42 +02:00
committed by Rubén Norte
parent b78f3fe792
commit df6d3ce6cf
3 changed files with 148 additions and 3 deletions
+7 -1
View File
@@ -303,9 +303,15 @@ These are the available config options for making requests. Only the `url` is re
httpsAgent: new https.Agent({ keepAlive: true }),
// 'proxy' defines the hostname and port of the proxy server
// `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and supplies credentials.
// This will set an `Proxy-Authorization` header, overwriting any existing `Proxy-Authorization` custom headers you have set using `headers`.
proxy: {
host: '127.0.0.1',
port: 9000
port: 9000,
auth: : {
username: 'mikeymike',
password: 'rapunz3l'
}
},
// `cancelToken` specifies a cancel token that can be used to cancel the request