【发布时间】:2021-03-10 06:10:17
【问题描述】:
我正在使用翻译,因为我是韩国人。即使我不擅长,我也会感谢您的理解。
我想使用 http 代理从 c# 发送一个 post 请求到 https web 到 http 代理。
HttpClient httpclient = null;
proxy = "http://" + proxy;
HttpClientHandler handler = new HttpClientHandler()
{
Proxy = new WebProxy(proxy),
UseProxy = true,
};
httpclient = new HttpClient(handler);
这是我的 C# 代码
但我无法连接到 https 网络。
有没有办法在c#中使用http客户端模块产生和下面python代码一样的效果?
proxy={ 'https' : 'http://' + input_proxy }
resp=self.desktop.post(self.url,self.payload,proxies=proxy)
【问题讨论】:
-
我推荐你访问这个链接:stackoverflow.com/questions/29856543/…
标签: c# http https proxy dotnet-httpclient