WebRequestHandler WebRequestHandler WebRequestHandler WebRequestHandler Class

Definition

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

public ref class WebRequestHandler : System::Net::Http::HttpClientHandler
public class WebRequestHandler : System.Net.Http.HttpClientHandler
type WebRequestHandler = class
    inherit HttpClientHandler
Public Class WebRequestHandler
Inherits HttpClientHandler
Inheritance

Remarks

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

Constructors

WebRequestHandler() WebRequestHandler() WebRequestHandler() WebRequestHandler()

Initializes a new instance of the WebRequestHandler class.

Properties

AllowAutoRedirect AllowAutoRedirect AllowAutoRedirect AllowAutoRedirect

Gets or sets a value that indicates whether the handler should follow redirection responses.

(Inherited from HttpClientHandler)
AllowPipelining AllowPipelining AllowPipelining AllowPipelining

Gets or sets a value that indicates whether to pipeline the request to the Internet resource.

AuthenticationLevel AuthenticationLevel AuthenticationLevel AuthenticationLevel

Gets or sets a value indicating the level of authentication and impersonation used for this request.

AutomaticDecompression AutomaticDecompression AutomaticDecompression AutomaticDecompression

Gets or sets the type of decompression method used by the handler for automatic decompression of the HTTP content response.

(Inherited from HttpClientHandler)
CachePolicy CachePolicy CachePolicy CachePolicy

Gets or sets the cache policy for this request.

CheckCertificateRevocationList CheckCertificateRevocationList CheckCertificateRevocationList CheckCertificateRevocationList

Gets or sets a value that indicates whether the certificate is checked against the certificate authority revocation list.

(Inherited from HttpClientHandler)
ClientCertificateOptions ClientCertificateOptions ClientCertificateOptions ClientCertificateOptions

Gets 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)
ClientCertificates ClientCertificates ClientCertificates ClientCertificates

Gets or sets the collection of security certificates that are associated with this request.

ContinueTimeout ContinueTimeout ContinueTimeout ContinueTimeout

Gets or sets the amount of time, in milliseconds, the application will wait for 100-continue from the server before uploading data.

CookieContainer CookieContainer CookieContainer CookieContainer

Gets or sets the cookie container used to store server cookies by the handler.

(Inherited from HttpClientHandler)
Credentials Credentials Credentials Credentials

Gets or sets authentication information used by this handler.

(Inherited from HttpClientHandler)
DefaultProxyCredentials DefaultProxyCredentials DefaultProxyCredentials DefaultProxyCredentials

When the default (system) proxy is being used, gets or sets the credentials to submit to the default proxy server for authentication. The default proxy is used only when UseProxy is set to true and Proxy is set to null.

(Inherited from HttpClientHandler)
ImpersonationLevel ImpersonationLevel ImpersonationLevel ImpersonationLevel

Gets or sets the impersonation level for the current request.

MaxAutomaticRedirections MaxAutomaticRedirections MaxAutomaticRedirections MaxAutomaticRedirections

Gets or sets the maximum number of redirects that the handler follows.

(Inherited from HttpClientHandler)
MaxConnectionsPerServer MaxConnectionsPerServer MaxConnectionsPerServer MaxConnectionsPerServer

Gets or sets the maximum number of concurrent connections (per server endpoint) allowed when making requests using an HttpClient object. Note that the limit is per server endpoint, so for example a value of 256 would permit 256 concurrent connections to http://www.adatum.com/ and another 256 to http://www.adventure-works.com/.

(Inherited from HttpClientHandler)
MaxRequestContentBufferSize MaxRequestContentBufferSize MaxRequestContentBufferSize MaxRequestContentBufferSize

Gets or sets the maximum request content buffer size used by the handler.

(Inherited from HttpClientHandler)
MaxResponseHeadersLength MaxResponseHeadersLength MaxResponseHeadersLength MaxResponseHeadersLength

Gets or sets the maximum allowed length of the response headers.

PreAuthenticate PreAuthenticate PreAuthenticate PreAuthenticate

Gets or sets a value that indicates whether the handler sends an Authorization header with the request.

(Inherited from HttpClientHandler)
Properties Properties Properties Properties

Gets a writable dictionary (that is, a map) of custom properties for the HttpClient requests. The dictionary is initialized empty; you can insert and query key-value pairs for your custom handlers and special processing.

(Inherited from HttpClientHandler)
Proxy Proxy Proxy Proxy

Gets or sets proxy information used by the handler.

(Inherited from HttpClientHandler)
ReadWriteTimeout ReadWriteTimeout ReadWriteTimeout ReadWriteTimeout

Gets or sets a time-out in milliseconds when writing a request to or reading a response from a server.

ServerCertificateCustomValidationCallback ServerCertificateCustomValidationCallback ServerCertificateCustomValidationCallback ServerCertificateCustomValidationCallback

Gets or sets a callback method to validate the server certificate.

(Inherited from HttpClientHandler)
ServerCertificateValidationCallback ServerCertificateValidationCallback ServerCertificateValidationCallback ServerCertificateValidationCallback

Gets or sets a callback method to validate the server certificate.

SslProtocols SslProtocols SslProtocols SslProtocols

Gets or sets the TLS/SSL protocol used by the HttpClient objects managed by the HttpClientHandler object.

(Inherited from HttpClientHandler)
SupportsAutomaticDecompression SupportsAutomaticDecompression SupportsAutomaticDecompression SupportsAutomaticDecompression

Gets a value that indicates whether the handler supports automatic response content decompression.

(Inherited from HttpClientHandler)
SupportsProxy SupportsProxy SupportsProxy SupportsProxy

Gets a value that indicates whether the handler supports proxy settings.

(Inherited from HttpClientHandler)
SupportsRedirectConfiguration SupportsRedirectConfiguration SupportsRedirectConfiguration SupportsRedirectConfiguration

Gets a value that indicates whether the handler supports configuration settings for the AllowAutoRedirect and MaxAutomaticRedirections properties.

(Inherited from HttpClientHandler)
UnsafeAuthenticatedConnectionSharing UnsafeAuthenticatedConnectionSharing UnsafeAuthenticatedConnectionSharing UnsafeAuthenticatedConnectionSharing

Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.

UseCookies UseCookies UseCookies UseCookies

Gets 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)
UseDefaultCredentials UseDefaultCredentials UseDefaultCredentials UseDefaultCredentials

Gets or sets a value that controls whether default credentials are sent with requests by the handler.

(Inherited from HttpClientHandler)
UseProxy UseProxy UseProxy UseProxy

Gets or sets a value that indicates whether the handler uses a proxy for requests.

(Inherited from HttpClientHandler)

Methods

Dispose() Dispose() Dispose() Dispose()

Releases the unmanaged resources and disposes of the managed resources used by the HttpMessageHandler.

(Inherited from HttpMessageHandler)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the HttpClientHandler and optionally disposes of the managed resources.

(Inherited from HttpClientHandler)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SendAsync(HttpRequestMessage, CancellationToken) SendAsync(HttpRequestMessage, CancellationToken) SendAsync(HttpRequestMessage, CancellationToken) SendAsync(HttpRequestMessage, CancellationToken)

Creates an instance of HttpResponseMessage based on the information provided in the HttpRequestMessage as an operation that will not block.

(Inherited from HttpClientHandler)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to