Skip to content

Commit

Permalink
Merge pull request #1080 from MarshallOfSound/patch-1
Browse files Browse the repository at this point in the history
Allow overriding the used transport
  • Loading branch information
nickuraltsev committed Oct 24, 2017
2 parents 8bea343 + b01ce19 commit fbb5d4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/adapters/http.js
Expand Up @@ -117,7 +117,9 @@ module.exports = function httpAdapter(config) {
}

var transport;
if (config.maxRedirects === 0) {
if (config.transport) {
transport = config.transport;
} else if (config.maxRedirects === 0) {
transport = isHttps ? https : http;
} else {
if (config.maxRedirects) {
Expand Down

0 comments on commit fbb5d4d

Please sign in to comment.