Comparing version 1.2.5 to 1.2.6
@@ -30,4 +30,15 @@ "use strict"; | ||
const retry_1 = require("./retry"); | ||
// tslint:disable-next-line variable-name | ||
const HttpsProxyAgent = require('https-proxy-agent'); | ||
// tslint:disable-next-line variable-name no-any | ||
let HttpsProxyAgent; | ||
// Figure out if we should be using a proxy. Only if it's required, load | ||
// the https-proxy-agent module as it adds startup cost. | ||
function loadProxy() { | ||
const proxy = process.env.HTTPS_PROXY || process.env.https_proxy || | ||
process.env.HTTP_PROXY || process.env.http_proxy; | ||
if (proxy) { | ||
HttpsProxyAgent = require('https-proxy-agent'); | ||
} | ||
return proxy; | ||
} | ||
loadProxy(); | ||
class Gaxios { | ||
@@ -130,4 +141,3 @@ /** | ||
} | ||
const proxy = process.env.HTTPS_PROXY || process.env.https_proxy || | ||
process.env.HTTP_PROXY || process.env.http_proxy; | ||
const proxy = loadProxy(); | ||
if (proxy) { | ||
@@ -134,0 +144,0 @@ if (this.agentCache.has(proxy)) { |
{ | ||
"name": "gaxios", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "A simple common HTTP client specifically for Google APIs and services.", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45550
509