Table of Contents

Class HttpMessageHandler

Namespace
System.Net.Http
Assembly
System.Net.Http.dll

A base type for HTTP message handlers.

public abstract class HttpMessageHandler : IDisposable
Inheritance
HttpMessageHandler
Implements
Derived
Inherited Members
Extension Methods

Remarks

There are various HTTP message handlers that can be used. These include the following.

  1. HttpClientHandler - A class that operates at the bottom of the handler chain that actually handles the HTTP transport operations.

If developers derive classes from HttpMessageHandler and override the Send(HttpRequestMessage) method, they must make sure that Send(HttpRequestMessage) can get called concurrently by different threads.

Constructors

HttpMessageHandler()

protected HttpMessageHandler()

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual 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 abstract HttpResponseMessage Send(HttpRequestMessage request)

Parameters

request HttpRequestMessage

The HTTP request message to send.

Returns

HttpResponseMessage

The HTTP response message.

Remarks

This is the .NET nanoFramework equivalent of Send(HttpRequestMessage).