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<T>(IExecutionContext)
Issues an HTTP request for the current request context.
public override Task<T> InvokeAsync<T>(IExecutionContext executionContext) where T : AmazonWebServiceResponse, new()
Parameters
executionContext
IExecutionContextThe execution context, it contains the request and response context.
Returns
- Task<T>
A task that represents the asynchronous operation.
Type Parameters
T
The response type for the current request.
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.