📜  UseProxyOnC# - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:42.834000             🧑  作者: Mango

代码示例1
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("[ultimate destination of your request]");
WebProxy myproxy = new WebProxy("[your proxy address]", [your proxy port number]);
myproxy.BypassProxyOnLocal = false;
request.Proxy = myproxy;
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse) request.GetResponse();