开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜