diff --git a/lib/adapters/http.js b/lib/adapters/http.js index dd07fcd..7d2fc8d 100644 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -63,6 +63,12 @@ module.exports = function httpAdapter(resolve, reject, config) { auth: auth }; + if (config.proxy) { + options.host = config.proxy.host; + options.port = config.proxy.port; + options.path = parsed.protocol + '//' + parsed.hostname + buildUrl(parsed.path, config.params).replace(/^\?/, '') + } + // Create the request var transport = parsed.protocol === 'https:' ? https : http; var req = transport.request(options, function handleResponse(res) {