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 | |
---|---|---|
HttpMessageInvoker(HttpMessageHandler) | Initializes a new instance of the HttpMessageInvoker class with the specified message handler. | |
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 | |
---|---|---|
Dispose() | Releases the unmanaged resources and disposes of the managed resources used by the invoker. | |
Dispose(Boolean) | Releases the unmanaged resources used by the invoker and optionally disposes of the managed resources. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
SendAsync | Sends an HTTP request with a cancellation token as an asynchronous operation. | |
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.