HttpResponseHeadersExtensions Class
- Namespace
- Kampute.HttpClient
- Assembly
- Kampute.HttpClient.dll
Definition
Provides extension methods for HttpResponseHeaders to facilitate HTTP response processing.
public static class HttpResponseHeadersExtensions- Inheritance
- object
- HttpResponseHeadersExtensions
Methods
TryExtractRateLimitResetTime(this HttpResponseHeaders, out Nullable<DateTimeOffset>)
Attempts to extract the rate limit reset time from the HTTP response headers.
public static bool TryExtractRateLimitResetTime(this HttpResponseHeaders headers, out Nullable<DateTimeOffset> resetTime)Parameters
headersHttpResponseHeaders- The HTTP response headers.
resetTimeNullable<DateTimeOffset>- When this method returns, contains the extracted time if the operation is successful; otherwise,
null. This parameter is passed uninitialized.
Returns
TryExtractRetryAfterTime(this HttpResponseHeaders, out Nullable<DateTimeOffset>)
Attempts to extract the retry-after time from the HTTP response headers.
public static bool TryExtractRetryAfterTime(this HttpResponseHeaders headers, out Nullable<DateTimeOffset> retryAfterTime)Parameters
headersHttpResponseHeaders- The HTTP response headers.
retryAfterTimeNullable<DateTimeOffset>- When this method returns, contains the extracted time if the operation is successful; otherwise,
null. This parameter is passed uninitialized.
