Namespace Google.Apis.Http
Classes
BackOffHandler
A thread-safe back-off handler which handles an abnormal HTTP response or an exception with IBackOff.
BackOffHandler.Initializer
An initializer class to initialize a back-off handler.
ConfigurableHttpClient
Configurable HTTP client inherits from HttpClient and contains a reference to ConfigurableMessageHandler.
ConfigurableMessageHandler
A message handler which contains the main logic of our HTTP requests. It contains a list of IHttpUnsuccessfulResponseHandlers for handling abnormal responses, a list of IHttpExceptionHandlers for handling exception in a request and a list of IHttpExecuteInterceptors for intercepting a request before it has been sent to the server. It also contains important properties like number of tries, follow redirect, etc.
CreateHttpClientArgs
Arguments for creating a HTTP client.
ExponentialBackOffInitializer
An initializer which adds exponential back-off as exception handler and \ or unsuccessful response handler by the given ExponentialBackOffPolicy.
HandleExceptionArgs
Argument class to HandleExceptionAsync(HandleExceptionArgs).
HandleUnsuccessfulResponseArgs
Argument class to HandleResponseAsync(HandleUnsuccessfulResponseArgs).
HttpClientFactory
The default implementation of the HTTP client factory.
HttpClientFromMessageHandlerFactory
An implementation of IHttpClientFactory that allows for the inner message handler to be injected.
HttpClientFromMessageHandlerFactory.ConfiguredHttpMessageHandler
Represents the already configured HttpMessageHandler to be used when building a ConfigurableHttpClient by the factory and information about the actual configuration.
HttpClientFromMessageHandlerFactory.HttpMessageHandlerOptions
Specifies the configuration options for a message handler.
HttpConsts
HTTP constants.
HttpExtenstions
Extension methods to HttpRequestMessage and HttpResponseMessage.
MaxUrlLengthInterceptor
Intercepts HTTP GET requests with a URLs longer than a specified maximum number of characters. The interceptor will change such requests as follows:
- The request's method will be changed to POST
- A
X-HTTP-Method-Override
header will be added with the valueGET
- Any query parameters from the URI will be moved into the body of the request.
- If query parameters are moved, the content type is set to
application/x-www-form-urlencoded
Interfaces
IConfigurableHttpClientInitializer
HTTP client initializer for changing the default behavior of HTTP client. Use this initializer to change default values like timeout and number of tries. You can also set different handlers and interceptors like IHttpUnsuccessfulResponseHandlers, IHttpExceptionHandlers and IHttpExecuteInterceptors.
IHttpClientFactory
HTTP client factory creates configurable HTTP clients. A unique HTTP client should be created for each service.
IHttpExceptionHandler
Exception handler is invoked when an exception is thrown during a HTTP request.
IHttpExecuteInterceptor
HTTP request execute interceptor to intercept a HttpRequestMessage before it has been sent. Sample usage is attaching "Authorization" header to a request.
IHttpUnsuccessfulResponseHandler
Unsuccessful response handler which is invoked when an abnormal HTTP response is returned when sending a HTTP request.
Enums
ConfigurableMessageHandler.LogEventType
Specifies the type(s) of request/response events to log.
ExponentialBackOffPolicy
Indicates if exponential back-off is used automatically on exceptions in a service requests and \ or when 503 responses is returned form the server.
Delegates
StreamInterceptor
A delegate used to intercept stream data without modifying it. The parameters should always be validated before the delegate is called, so the delegate itself does not need to validate them again.