You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I use axios.get method with custom httpsAgent and httpAgent in node.js. The node_internals _http_client.js emit a warn when the server response http statue code 302 and headers location's protocol is different with the initiator url's protocol.
To Reproduce
Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. If your problem is not reproducible, please file under Support or Usage Question
// Example code hereconstaxios=require("axios");consthttps=require("https");consthttp=require("http");consthttpsAgent=newhttps.Agent({keepAlive: true})consthttpAgent=newhttp.Agent({keepAlive: true})consturl='https://xxxxx';axios.get(url,{
httpsAgent,
httpAgent
}).then(()=>{console.log("success");}).catch(()=>{console.error("error:");});
I had read the axios' code , the httpFollow and httpsFollow's options should includes customer's agent
Expected behavior
axios use a new agent adapter the redirect url protocol
Environment:
Axios Version: 0.19.0
Node Version: v12.14.0
Additional context/Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
I use axios.get method with custom httpsAgent and httpAgent in node.js. The node_internals _http_client.js emit a warn when the server response http statue code 302 and headers location's protocol is different with the initiator url's protocol.
To Reproduce
Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. If your problem is not reproducible, please file under Support or Usage Question
I had read the axios' code , the httpFollow and httpsFollow's options should includes customer's agent
Expected behavior
axios use a new agent adapter the redirect url protocol
Environment:
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: