public sealed class HttpTimeoutInitializer : IConfigurableHttpClientInitializer
Used for specifying a custom timeout for a ConfigurableHttpClient.
Implements
IConfigurableHttpClientInitializerNamespace
Google.Apis.CoreAssembly
Google.Apis.Core.dll
Constructors
HttpTimeoutInitializer(TimeSpan)
public HttpTimeoutInitializer(TimeSpan httpClientTimeout)
Creates a new instance with the given timeout.
Parameter | |
---|---|
Name | Description |
httpClientTimeout |
TimeSpan |
This initializer relies on ConfigurableHttpClient for validation.
That means that httpClientTimeout
is not validated in this constructor.
It's when this initializer is applied to a ConfigurableHttpClient
that the value will be validated and an exception possibly thrown.
Properties
HttpClientTimeout
public TimeSpan HttpClientTimeout { get; }
The timeout to set on ConfigurableHttpClient instances on which this initializer is applied.
Property Value | |
---|---|
Type | Description |
TimeSpan |
Methods
Initialize(ConfigurableHttpClient)
public void Initialize(ConfigurableHttpClient httpClient)
Initializes a HTTP client after it was created.
Parameter | |
---|---|
Name | Description |
httpClient |
ConfigurableHttpClient |