IWebProxy proxy = WebRequest.GetSystemWebProxy();
proxy.Credentials = CredentialCache.DefaultCredentials;
HttpClient.DefaultProxy = proxy;
这些代码直接写在Main中时候,记得先启动抓包工具,才能为NetCore配置上代理,这是自动读取系统代理的。
本文链接:https://blog.nnwk.net/article/75
有问题请留言。版权所有,转载请在显眼位置处保留文章出处,并留下原文连接
Leave your question and I'll get back to you as soon as I see it. All rights reserved. Please keep the source and links
友情链接:
子卿全栈
全部评论