Class HttpTimeoutInitializer
Used for specifying a custom timeout for a ConfigurableHttpClient.
Implements
Inherited Members
Namespace: Google.Apis.Core
Assembly: Google.Apis.Core.dll
Syntax
public sealed class HttpTimeoutInitializer : IConfigurableHttpClientInitializer
Constructors
HttpTimeoutInitializer(TimeSpan)
Creates a new instance with the given timeout.
Declaration
public HttpTimeoutInitializer(TimeSpan httpClientTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | httpClientTimeout |
Remarks
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
The timeout to set on ConfigurableHttpClient instances on which this initializer is applied.
Declaration
public TimeSpan HttpClientTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
Initialize(ConfigurableHttpClient)
Initializes a HTTP client after it was created.
Declaration
public void Initialize(ConfigurableHttpClient httpClient)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurableHttpClient | httpClient |