Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
WebRequestHandler Class

WebRequestHandler Class

.NET Framework 4.6 and 4.5

Provides desktop-specific features not available to Windows Store apps or other environments.

Namespace:  System.Net.Http
Assembly:  System.Net.Http.WebRequest (in System.Net.Http.WebRequest.dll)

public class WebRequestHandler : HttpClientHandler

The WebRequestHandler type exposes the following members.

Public methodWebRequestHandlerInitializes a new instance of the WebRequestHandler class.

Public propertyAllowAutoRedirectGets or sets a value that indicates whether the handler should follow redirection responses. (Inherited from HttpClientHandler.)
Public propertyAllowPipelining Gets or sets a value that indicates whether to pipeline the request to the Internet resource.
Public propertyAuthenticationLevelGets or sets a value indicating the level of authentication and impersonation used for this request.
Public propertyAutomaticDecompressionGets or sets the type of decompression method used by the handler for automatic decompression of the HTTP content response. (Inherited from HttpClientHandler.)
Public propertyCachePolicyGets or sets the cache policy for this request.
Public propertyClientCertificateOptionsGets or sets a value that indicates if the certificate is automatically picked from the certificate store or if the caller is allowed to pass in a specific client certificate. (Inherited from HttpClientHandler.)
Public propertyClientCertificatesGets or sets the collection of security certificates that are associated with this request.
Public propertyContinueTimeoutGets or sets the amount of time, in milliseconds, the application will wait for 100-continue from the server before uploading data.
Public propertyCookieContainerGets or sets the cookie container used to store server cookies by the handler. (Inherited from HttpClientHandler.)
Public propertyCredentialsGets or sets authentication information used by this handler. (Inherited from HttpClientHandler.)
Public propertyImpersonationLevelGets or sets the impersonation level for the current request.
Public propertyMaxAutomaticRedirectionsGets or sets the maximum number of redirects that the handler follows. (Inherited from HttpClientHandler.)
Public propertyMaxRequestContentBufferSizeGets or sets the maximum request content buffer size used by the handler. (Inherited from HttpClientHandler.)
Public propertyMaxResponseHeadersLengthGets or sets the maximum allowed length of the response headers.
Public propertyPreAuthenticateGets or sets a value that indicates whether the handler sends an Authorization header with the request. (Inherited from HttpClientHandler.)
Public propertyProxyGets or sets proxy information used by the handler. (Inherited from HttpClientHandler.)
Public propertyReadWriteTimeoutGets or sets a time-out in milliseconds when writing a request to or reading a response from a server.
Public propertyServerCertificateValidationCallbackGets or sets a callback method to validate the server certificate.
Public propertySupportsAutomaticDecompressionGets a value that indicates whether the handler supports automatic response content decompression. (Inherited from HttpClientHandler.)
Public propertySupportsProxyGets a value that indicates whether the handler supports proxy settings. (Inherited from HttpClientHandler.)
Public propertySupportsRedirectConfigurationGets a value that indicates whether the handler supports configuration settings for the AllowAutoRedirect and MaxAutomaticRedirections properties. (Inherited from HttpClientHandler.)
Public propertyUnsafeAuthenticatedConnectionSharingGets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
Public propertyUseCookiesGets or sets a value that indicates whether the handler uses the CookieContainer property to store server cookies and uses these cookies when sending requests. (Inherited from HttpClientHandler.)
Public propertyUseDefaultCredentialsGets or sets a value that controls whether default credentials are sent with requests by the handler. (Inherited from HttpClientHandler.)
Public propertyUseProxyGets or sets a value that indicates whether the handler uses a proxy for requests. (Inherited from HttpClientHandler.)

Public methodDispose()Releases the unmanaged resources and disposes of the managed resources used by the HttpMessageHandler. (Inherited from HttpMessageHandler.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the HttpClientHandler and optionally disposes of the managed resources. (Inherited from HttpClientHandler.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSendAsyncCreates an instance of HttpResponseMessage based on the information provided in the HttpRequestMessage as an operation that will not block. (Inherited from HttpClientHandler.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

This class implements a transport handler using HttpWebRequest instances to send HTTP requests to servers.

.NET Framework

Supported in: 4.6, 4.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft