Kampute.HttpClient Namespace

This namespace contains HttpRestClient, its request helpers, retry policies, and the types that describe failures.

Classes

AuthSchemesProvides the names of common HTTP authentication schemes, for use in the Authorization header.
HttpContentExceptionThe exception that is thrown when the content of a response cannot be read into the requested type.
HttpContentExtensionsProvides extension methods for HttpContent.
HttpContentFormatterCollectionRepresents the content formatters of an HttpRestClient, in the order they were added.
HttpErrorHandlerCollectionRepresents the error handlers of an HttpRestClient, in the order they were added.
HttpRequestErrorContextDescribes a failed request to the code that decides whether to retry it: the client, the request, and the error.
HttpRequestMessageEventArgsProvides the request of the HttpRestClient.BeforeSendingRequest event.
HttpRequestMessageExtensionsProvides extension methods for HttpRequestMessage that error handlers use to retry a request.
HttpRequestMessagePropertyKeysProvides the keys of the request properties that HttpRestClient sets and reads.
HttpRequestScopeCollects headers and request properties, and applies them to the requests that a client sends within HttpRequestScope.PerformAsync(Func<HttpRestClient, Task>).
HttpResponseErrorContextDescribes an error response to the error handlers that decide whether to retry the request: the client, the request, the response, and the error.
HttpResponseExceptionThe exception that is thrown when a request receives an error response that no error handler retries.
HttpResponseHeadersExtensionsProvides extension methods that read the retry time a response suggests from its headers.
HttpResponseMessageEventArgsProvides the response of the HttpRestClient.AfterReceivingResponse event.
HttpRestClientSends requests to a REST API through an HttpClient, and converts between .NET objects and HTTP content.
HttpRestClientExtensionsProvides extension methods for HttpRestClient that send requests with the common HTTP methods.
HttpRestClientFormExtensionsProvides extension methods for HttpRestClient that send key-value pairs as application/x-www-form-urlencoded content.
HttpRetryPolicyRetries failed HTTP requests as a retry strategy decides.
HttpRetryPolicyExtensionsProvides extension methods that use an IRetryStrategy for retrying HTTP requests.
HttpRetryStateHolds the retry sessions of one call to an HttpRestClient, shared by every attempt of that call.
HttpVerbProvides the standard HTTP methods on every target framework.
MediaTypeHeaderValueStoreProvides shared MediaTypeWithQualityHeaderValue instances for Accept headers, so that a value is not parsed again for every request.
MediaTypeNamesProvides the names of common media types.
MediaTypeNames.ApplicationRepresents media type names for application content types.
MediaTypeNames.AudioRepresents media type names for audio content types.
MediaTypeNames.ImageRepresents media type names for image content types.
MediaTypeNames.TextRepresents media type names for text content types.
MediaTypeNames.VideoRepresents media type names for video content types.

Structs

HttpErrorHandlerResultRepresents the decision of an error handler: retry with a given request, or do not retry.