WebClient Proxy

方通
2023-12-01
            var client = new WebClient();
            //client.Headers.Add(HttpRequestHeader.Authorization, Environment.UserName);

            WebProxy proxyObject = new WebProxy("http://xxx.xxx.xxx.xxx:8080/", true);
            NetworkCredential credential = new NetworkCredential("xxxx", "nnnn");
            proxyObject.Credentials = credential;
            client.Proxy = proxyObject;
            
            //client.DownloadFile(textBox1.Text, "weiboimage.jpg");
            byte[] data = client.DownloadData(textBox1.Text);

 类似资料:

相关阅读

相关文章

相关问答