[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Contains HTTP proxy settings for the WebRequest class.
Assembly: System.Http (in System.Http.dll)
Thetype exposes the following members.
|WebProxy()()()()||Initializes an empty instance of the class.|
|WebProxy(String)||Initializes a new instance of the class with the specified URI.|
|WebProxy(Uri)||Initializes a new instance of the class from the specified Uri instance.|
|WebProxy(String, Boolean)||Initializes a new instance of the class with the specified URI and bypass setting.|
|WebProxy(String, Int32)||Initializes a new instance of the class with the specified host and port number.|
|WebProxy(Uri, Boolean)||Initializes a new instance of the class with the Uri instance and bypass setting.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetProxy||Returns the proxied URI for a request.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|IsBypassed||Indicates whether to use the proxy server for the specified host.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The class contains the proxy settings that WebRequest instances use to determine whether a Web proxy is used to send requests. Global Web proxy settings can be specified in machine and application configuration files, and applications can use instances of the class to customize Web proxy use. The class is the base implementation of the IWebProxy interface.
To obtain instances of the Web proxy class, you can use any of the following methods:
The WebProxy constructor.
These methods each supply a instance that you can further customize; the difference between them is how the instance is initialized before it is returned to your application. The WebProxy constructor returns an instance of the class with the Address property set to nullNothingnullptrunita null reference (Nothing in Visual Basic). When a request uses a instance in this state, no proxy is used to send the request.
The method returns an instance of the class with it properties set according to a combination of Internet Explorer and configuration file settings.