HttpMessageInvoker Class

A specialty class that allows applications to call the SendAsync method on an Http handler chain.

Inheritance Hierarchy

System.Object
  System.Net.Http.HttpMessageInvoker
    System.Net.Http.HttpClient

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

Syntax

'Declaration
Public Class HttpMessageInvoker _
    Implements IDisposable
'Usage
Dim instance As HttpMessageInvoker
public class HttpMessageInvoker : IDisposable
public ref class HttpMessageInvoker : IDisposable
type HttpMessageInvoker =  
    class 
        interface IDisposable 
    end
public class HttpMessageInvoker implements IDisposable

The HttpMessageInvoker type exposes the following members.

Constructors

  Name Description
Public method HttpMessageInvoker(HttpMessageHandler) Initializes a new instance of the HttpMessageInvoker class with the specified message handler.
Public method HttpMessageInvoker(HttpMessageHandler, Boolean) Initializes a new instance of the HttpMessageInvoker class with the specified message handler and value that indicates whether this instance is responsible for disposing the handler.

Top

Methods

  Name Description
Public method Dispose() Releases the unmanaged resources and disposes of the managed resources used by the invoker.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the invoker and optionally disposes of the managed resources.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method SendAsync Sends an HTTP request with a cancellation token as an asynchronous operation.
Public method ToString (Inherited from Object.)

Top

Remarks

This class is the base type for HttpClient and other message originators.Most applications that are connecting to a web site will use one of the SendAsync methods on the HttpClient class.

Thread Safety

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

See Also

Reference

System.Net.Http Namespace