2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00

Merge pull request #1080 from MarshallOfSound/patch-1

Allow overriding the used transport
This commit is contained in:
Nick Uraltsev
2017-10-24 07:58:13 -07:00
committed by GitHub
+3 -1
View File
@@ -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) {