public interface IWebProxy
System
Networking
Defines the methods and properties required by types that support accessing hosts via proxy servers.
[Note: This interface is implemented by the WebRequest type.]
System.Net Namespace
IWebProxy Methods
IWebProxy.GetProxy Method
IWebProxy.IsBypassed Method
IWebProxy Properties
Uri GetProxy(Uri destination);
Returns the Uniform Resource Identifier (URI) of a proxy server.
- destination
- A Uri specifying the requested Internet resource.
A Uri instance containing the URI of the proxy used to contact destination.
[Behaviors: The System.Net.IWebProxy.GetProxy(System.Uri) method returns the URI of the proxy server that handles requests to the Internet resource specified in the destination parameter.]
[Usage: Use this method to get the URI of the proxy server used to access the specified resource. ]
System.Net.IWebProxy Interface, System.Net Namespace
bool IsBypassed(Uri host);
Returns a Boolean value that indicates whether the proxy server is not used to access a specified server.
- host
- The Uri of the server to check for proxy use.
true
if the proxy server is not used to access the server specified in host; otherwise,false
.
[Behaviors: The value returned by the System.Net.IWebProxy.IsBypassed(System.Uri) method indicates whether requests that access the server specified in the host parameter bypass the proxy server. ]
[Usage: If System.Net.IWebProxy.IsBypassed(System.Uri) is
true
, requests and responses between the client and host are not required to go through the proxy server.]
System.Net.IWebProxy Interface, System.Net Namespace
ICredentials Credentials { get; set; }
Gets or sets the credentials to submit to the proxy server for authentication.
A ICredentials instance that contains the credentials needed to authenticate a request to the proxy server.
[Behaviors: The ICredentials instance set and returned by the System.Net.IWebProxy.Credentials property contains the credentials that are sent to the proxy server in response to an HTTP 407 (System.Net.HttpStatusCode.ProxyAuthenticationRequired ) status code.]
[Usage: Use this property to set the credentials supplied in response to HTTP 407 status code messages.]
System.Net.IWebProxy Interface, System.Net Namespace