A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.defaultproxy below:

HttpClient.DefaultProxy Property (System.Net.Http) | Microsoft Learn

HttpClient.DefaultProxy Property Definition

Gets or sets the global HTTP proxy.

public:
 static property System::Net::IWebProxy ^ DefaultProxy { System::Net::IWebProxy ^ get(); void set(System::Net::IWebProxy ^ value); };
public static System.Net.IWebProxy DefaultProxy { get; set; }
static member DefaultProxy : System.Net.IWebProxy with get, set
Public Shared Property DefaultProxy As IWebProxy
Property Value

A proxy used by every HTTP request.

Exceptions

The value passed cannot be null.

Remarks

This static property determines the default proxy that all HttpClient instances use if no proxy is set explicitly in the HttpMessageHandler passed through its constructor.

The default instance returned by this property will initialize following a different set of rules depending on your platform:

The environment variables used for DefaultProxy initialization on Windows and Unix-based platforms are:

On systems where environment variables are case-sensitive, the variable names may be all lowercase or all uppercase. The lowercase names are checked first.

The proxy server may be a hostname or IP address, optionally followed by a colon and port number, or it may be an http, https, socks4, socks4a, or socks5 URL. The URL cannot include any text after the hostname, IP, or port. If a scheme isn't specified, http is assumed. The URL may optionally include a username and password for proxy authentication, but the password is ignored when using socks4 or socks4a as the protocols have no support for password authentication.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4