mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Merge pull request #1080 from MarshallOfSound/patch-1
Allow overriding the used transport
This commit is contained in:
@@ -117,7 +117,9 @@ module.exports = function httpAdapter(config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var transport;
|
var transport;
|
||||||
if (config.maxRedirects === 0) {
|
if (config.transport) {
|
||||||
|
transport = config.transport;
|
||||||
|
} else if (config.maxRedirects === 0) {
|
||||||
transport = isHttps ? https : http;
|
transport = isHttps ? https : http;
|
||||||
} else {
|
} else {
|
||||||
if (config.maxRedirects) {
|
if (config.maxRedirects) {
|
||||||
|
|||||||
Reference in New Issue
Block a user