Class HttpClientHandler
The default message handler used by HttpClient in .NET nanoFramework.
public class HttpClientHandler : HttpMessageHandler, IDisposable
- Inheritance
-
HttpClientHandler
- Implements
- Inherited Members
- Extension Methods
Constructors
HttpClientHandler()
Creates an instance of a HttpClientHandler class.
public HttpClientHandler()
Properties
ClientCertificate
Gets the collection of security certificates that are associated with requests to the server.
public X509Certificate ClientCertificate { get; }
Property Value
- X509Certificate
The X509Certificate that is presented to the server when performing certificate based client authentication.
Remarks
.NET nanoFramework only supports using one client certificate on the request, therefore this is not a collection has it happens with the equivalent .NET property.
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.
public ClientCertificateOption ClientCertificateOptions { get; set; }
Property Value
- ClientCertificateOption
The collection of security certificates associated with this handler.
Credentials
Gets or sets authentication information used by this handler.
public NetworkCredential Credentials { get; set; }
Property Value
- NetworkCredential
The authentication credentials associated with the handler. The default is null.
Proxy
Gets or sets proxy information used by the handler.
public IWebProxy Proxy { get; set; }
Property Value
- IWebProxy
The proxy information used by the handler. The default value is null.
SslProtocols
Gets or sets the TLS/SSL protocol used by the HttpClientHandler class.
public SslProtocols SslProtocols { get; set; }
Property Value
- SslProtocols
One of the values defined in the SslProtocols enumeration.
SupportsAutomaticDecompression
Gets a value that indicates whether the handler supports automatic response content decompression.
public virtual bool SupportsAutomaticDecompression { get; }
Property Value
- bool
true if the if the handler supports automatic response content decompression; otherwise false. The default value is false.
Remarks
The default value for .NET nanoFramework is false.
SupportsProxy
Gets a value that indicates whether the handler supports proxy settings.
public virtual bool SupportsProxy { get; }
Property Value
- bool
true if the if the handler supports proxy settings; otherwise false. The default value is true.
SupportsRedirectConfiguration
Gets a value that indicates whether the handler supports configuration settings for the AllowAutoRedirect and MaxAutomaticRedirections properties.
public virtual bool SupportsRedirectConfiguration { get; }
Property Value
- bool
true if the if the handler supports configuration settings for the AllowAutoRedirect and MaxAutomaticRedirections properties; otherwise false. The default value is false.
Remarks
The default value for .NET nanoFramework is false.
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.
public bool UseCookies { get; }
Property Value
- bool
true if the if the handler supports uses the CookieContainer property to store server cookies and uses these cookies when sending requests; otherwise false. The default value is false.
Remarks
The default value for .NET nanoFramework is false.
UseProxy
Gets or sets a value that indicates whether the handler uses a proxy for requests.
public bool UseProxy { get; set; }
Property Value
- bool
true if the handler should use a proxy for requests; otherwise false. The default value is true.
Methods
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Send(HttpRequestMessage)
When overridden in a derived class, sends an HTTP request with the specified request. Otherwise, throws a NotSupportedException.
protected override HttpResponseMessage Send(HttpRequestMessage request)
Parameters
request
HttpRequestMessageThe HTTP request message to send.
Returns
- HttpResponseMessage
The HTTP response message.
Remarks
This is the .NET nanoFramework equivalent of Send(HttpRequestMessage).