Protocol "https:" not supported. Expected "http:" Error
See original GitHub issueconst agent = new http.Agent({family: 4});
axios.get("http://mywebsite.com", {
httpAgent: agent
})
.then((response) => {
console.log(response);
})
With above code, I get below error
http_client.js:55 throw new Error(‘Protocol "’ + protocol + '" not supported. ’ + ^
Error: Protocol “https:” not supported. Expected “http:” at new ClientRequest (_http_client.js:55:11)
I am using Axios 0.15.3 and Node 6.10.0 version
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Node js Error: Protocol "https:" not supported. Expected "http:"
The reason for this error is that you are trying to call a HTTPS URI from a HTTP client. The ideal ...
Read more >[BUG] Protocol "https:" not supported. Expected "http:" #2003
I've fixed this error by unset all the proxy environment: unset http_proxy; unset https_proxy; unset all_proxy;.
Read more >Node js Error: Protocol "https:" not supported. Expected "http:"
JavaScript : Node js Error : Protocol " https :" not supported. Expected " http :" [ Gift : Animated Search Engine :...
Read more >Protocol "http:" not supported. Expected "https:"
In my application when I try to login with Auth0, I get the following error and the login fails. Protocol "http:" not supported....
Read more >Protocol https not supported node js
This is caused by running your application using SSL but calling it via normal HTTP. You would need to put a check in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
dparmar74 , it is an error, it does not return a “redirect” or a target url, how did you do to solve the issue? I can’t check now, would it work to type:
@dparmar74 its an issue, breaks completly node js server and cant be even catched only if the external url configuration is incorrect.