getProxy() public method

public getProxy ( ) : WebProxy
return System.Net.WebProxy
Exemplo n.º 1
0
        protected HttpWebRequest newRequest(string method, string url, IDictionary <String, String> headers)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

            request.Method  = method;
            request.Timeout = timeout;
            request.Proxy   = lyricsReloaded.getProxy();
            if (headers != null)
            {
                foreach (KeyValuePair <String, String> header in headers)
                {
                    this.setHeader(request, header.Key, header.Value);
                }
            }

            return(request);
        }