HttpErrorHandlerResult Struct
- Namespace
- Kampute.HttpClient
- Assembly
- Kampute.HttpClient.dll
Definition
Represents the decision of an error handler: retry with a given request, or do not retry.
public readonly struct HttpErrorHandlerResultRemarks
A NoRetry decision only means that this handler does not retry; the client then asks the next handler that can handle the status code.
Fields
NoRetry
The decision not to retry.
public static readonly HttpErrorHandlerResult NoRetryField Value
RequestToRetry
The request to send as the retry, or
null if the handler does not retry.public readonly HttpRequestMessage RequestToRetryField Value
Methods
Retry(HttpRequestMessage)
Creates a decision to retry with the specified request.
public static HttpErrorHandlerResult Retry(HttpRequestMessage requestToRetry)Parameters
requestToRetryHttpRequestMessage- The request to send, such as a clone of the failed request made with Clone(this HttpRequestMessage), or a new request.
Returns
- HttpErrorHandlerResult
- An HttpErrorHandlerResult whose RequestToRetry is
requestToRetry.
Exceptions
- ArgumentNullException
- Thrown if
requestToRetryisnull.
