c#httpWebrequest与代理工作,但不是curl [英] c# httpWebrequest with proxy works but not curl
本文介绍了c#httpWebrequest与代理工作,但不是curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以通过使用c#和httpWebrequest的身份验证的公司代理发出请求。
I can make a request through a corporate proxy with authentication using c# and httpWebrequest. I could then get the proxy and port used.
然后我尝试使用curl,wget和rebol,并且都失败了。
Then I tried to use it with curl, wget and rebol and all failed.
例如,在创建包含代理ip和端口的环境变量http-proxy之后,我在cmd提示符下键入以下命令:
For example after creating environment variable http-proxy containing proxy ip and port, I type this command in cmd prompt:
curl --proxy-user login:password google.com
它回答
(6) could not resolve host:google.com
由于什么原因,http请求适用于c#而不适用于其他人?
For what reason does http request works for c# and not for others ?
推荐答案
您尝试的语法类似于:
curl -U user:passwd -x proxy:port http://www.stackoverflow.com/
这篇关于c#httpWebrequest与代理工作,但不是curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文