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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eHttpTimeoutInitializer\u003c/code\u003e class is used to specify a custom timeout for a \u003ccode\u003eConfigurableHttpClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements \u003ccode\u003eIConfigurableHttpClientInitializer\u003c/code\u003e and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt is instantiated with a \u003ccode\u003eTimeSpan\u003c/code\u003e value representing the desired HTTP client timeout which is not validated until it is applied to the \u003ccode\u003eConfigurableHttpClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHttpClientTimeout\u003c/code\u003e property retrieves the timeout value that will be set on \u003ccode\u003eConfigurableHttpClient\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInitialize\u003c/code\u003e method is used to initialize an HTTP client after it has been created, with the \u003ccode\u003eConfigurableHttpClient\u003c/code\u003e as the parameter.\u003c/p\u003e\n"]]],[],null,["# Class HttpTimeoutInitializer (1.69.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.69.0 (latest)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Core.HttpTimeoutInitializer)\n- [1.68.0](/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Core.HttpTimeoutInitializer)\n- [1.60.0](/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Core.HttpTimeoutInitializer)\n- [1.59.0](/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Core.HttpTimeoutInitializer)\n- [1.55.0](/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Core.HttpTimeoutInitializer)\n- [1.50.0](/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Core.HttpTimeoutInitializer) \n\n public sealed class HttpTimeoutInitializer : IConfigurableHttpClientInitializer\n\nUsed for specifying a custom timeout for a [ConfigurableHttpClient](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e HttpTimeoutInitializer \n\nImplements\n----------\n\n[IConfigurableHttpClientInitializer](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IConfigurableHttpClientInitializer) \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Apis.Core](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Core)\n\nAssembly\n--------\n\nGoogle.Apis.Core.dll\n\nConstructors\n------------\n\n### HttpTimeoutInitializer(TimeSpan)\n\n public HttpTimeoutInitializer(TimeSpan httpClientTimeout)\n\nCreates a new instance with the given timeout.\n\n**Remarks** \nThis initializer relies on [ConfigurableHttpClient](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient) for validation.\nThat means that `httpClientTimeout` is not validated in this constructor.\nIt's when this initializer is applied to a [ConfigurableHttpClient](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient)\nthat the value will be validated and an exception possibly thrown.\n\nProperties\n----------\n\n### HttpClientTimeout\n\n public TimeSpan HttpClientTimeout { get; }\n\nThe timeout to set on [ConfigurableHttpClient](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ConfigurableHttpClient) instances on which this initializer is applied.\n\nMethods\n-------\n\n### Initialize(ConfigurableHttpClient)\n\n public void Initialize(ConfigurableHttpClient httpClient)\n\nInitializes a HTTP client after it was created.\n\nExtension Method\n----------------\n\n[Utilities.ThrowIfNull\\\u003cT\\\u003e(T, string)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)"]]