1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public sealed class HttpTimeoutInitializer : IConfigurableHttpClientInitializer

Used for specifying a custom timeout for a [ConfigurableHttpClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient.md.txt).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> HttpTimeoutInitializer

## Implements

[IConfigurableHttpClientInitializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IConfigurableHttpClientInitializer.md.txt)

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apis.Core](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Core.md.txt)

## 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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient.md.txt) for validation.
That means that `httpClientTimeout` is not validated in this constructor.
It's when this initializer is applied to a [ConfigurableHttpClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient.md.txt)
that the value will be validated and an exception possibly thrown.

## Properties

### HttpClientTimeout

    public TimeSpan HttpClientTimeout { get; }

The timeout to set on [ConfigurableHttpClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient.md.txt) 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

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities.md.txt#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)