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
requestFactoryIHttpRequestFactory<TRequestContent>The request factory used to create HTTP Requests.
callbackSenderobjectThe 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
requestContextIRequestContextThe 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
disposingbool
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
executionContextIExecutionContextThe execution context, it contains the request and response context.
Returns
- Task<T>
A task that represents the asynchronous operation.
Type Parameters
TThe response type for the current request.
InvokeSync(IExecutionContext)
Issues an HTTP request for the current request context.
public override void InvokeSync(IExecutionContext executionContext)
Parameters
executionContextIExecutionContextThe execution context which contains both the requests and response context.