Class HttpTimeoutInitializer (1.69.0)

public sealed class HttpTimeoutInitializer : IConfigurableHttpClientInitializer

Used for specifying a custom timeout for a ConfigurableHttpClient.

Inheritance

object > HttpTimeoutInitializer

Namespace

Google.Apis.Core

Assembly

Google.Apis.Core.dll

Constructors

HttpTimeoutInitializer(TimeSpan)

public HttpTimeoutInitializer(TimeSpan httpClientTimeout)

Creates a new instance with the given timeout.

Parameter
Name Description
httpClientTimeout TimeSpan
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

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

Extension Method