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