c# httpWebrequest with proxy works but not curl
I can make a request through a corporate proxy with authentication using c# and httpWebrequest. I could then get the proxy and port used.
Then I tried to use it with curl, wget and rebol and all failed.
For example after creating environment variable h开发者_StackOverflow社区ttp-proxy containing proxy ip and port, I type this command in cmd prompt:
curl --proxy-user login:password google.com
it answers
(6) could not resolve host:google.com
For what reason does http request works for c# and not for others ?
Have you tried syntax similar to:
curl -U user:passwd -x proxy:port http://www.stackoverflow.com/
The environment variable for a http proxy should be 'http_proxy' (minus the quotes). Note the lower case letters and underscore.
精彩评论