Class HttpHandler<TRequestContent>
The HTTP handler contains common logic for issuing an HTTP request that is independent of the underlying HTTP infrastructure.
public class HttpHandler<TRequestContent> : PipelineHandler, IPipelineHandler, IDisposable
Type Parameters
TRequestContent
- Inheritance
-
HttpHandler<TRequestContent>
- Implements
- Inherited Members
Constructors
HttpHandler(IHttpRequestFactory<TRequestContent>, object)
The constructor for HttpHandler.
public HttpHandler(IHttpRequestFactory<TRequestContent> requestFactory, object callbackSender)
Parameters
requestFactory
IHttpRequestFactory<TRequestContent>The request factory used to create HTTP Requests.
callbackSender
objectThe sender parameter used in any events raised by this handler.
Properties
CallbackSender
The sender parameter used in any events raised by this handler.
public object CallbackSender { get; }
Property Value
Methods
CreateWebRequest(IRequestContext)
Creates the HttpWebRequest and configures the end point, content, user agent and proxy settings.
protected virtual IHttpRequest<TRequestContent> CreateWebRequest(IRequestContext requestContext)
Parameters
requestContext
IRequestContextThe async request.
Returns
- IHttpRequest<TRequestContent>
The web request that actually makes the call.
Dispose()
Disposes the HTTP handler.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
InvokeAsync(IAsyncExecutionContext)
Issues an HTTP request for the current request context.
public override IAsyncResult InvokeAsync(IAsyncExecutionContext executionContext)
Parameters
executionContext
IAsyncExecutionContextThe execution context which contains both the requests and response context.
Returns
- IAsyncResult
IAsyncResult which represent an async operation.
InvokeSync(IExecutionContext)
Issues an HTTP request for the current request context.
public override void InvokeSync(IExecutionContext executionContext)
Parameters
executionContext
IExecutionContextThe execution context which contains both the requests and response context.