### YamlMime:JavaType uid: "com.azure.core.util.HttpClientOptions" fullName: "com.azure.core.util.HttpClientOptions" name: "HttpClientOptions" nameWithType: "HttpClientOptions" summary: "General configuration options for ." inheritances: - "" - "" inheritedClassMethods: - classRef: "" methodsRef: - "" - "" - "" - "" - "" - ")?alt=com.azure.core.util.ClientOptions.setHeaders&text=setHeaders\" data-throw-if-not-resolved=\"False\" />" - "" - "" - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" syntax: "public final class **HttpClientOptions**
extends " constructors: - uid: "com.azure.core.util.HttpClientOptions.HttpClientOptions()" fullName: "com.azure.core.util.HttpClientOptions.HttpClientOptions()" name: "HttpClientOptions()" nameWithType: "HttpClientOptions.HttpClientOptions()" summary: "Creates a new instance of ." syntax: "public HttpClientOptions()" desc: "Creates a new instance of ." methods: - uid: "com.azure.core.util.HttpClientOptions.getConfiguration()" fullName: "com.azure.core.util.HttpClientOptions.getConfiguration()" name: "getConfiguration()" nameWithType: "HttpClientOptions.getConfiguration()" summary: "Gets the configuration store that the will use." syntax: "public Configuration getConfiguration()" desc: "Gets the configuration store that the will use." returns: description: "The configuration store to use." type: "" - uid: "com.azure.core.util.HttpClientOptions.getConnectTimeout()" fullName: "com.azure.core.util.HttpClientOptions.getConnectTimeout()" name: "getConnectTimeout()" nameWithType: "HttpClientOptions.getConnectTimeout()" summary: "Gets the connection timeout for a request to be sent." syntax: "public Duration getConnectTimeout()" desc: "Gets the connection timeout for a request to be sent.\n\nThe connection timeout begins once the request attempts to connect to the remote host and finishes when the connection is resolved.\n\nIf `connectTimeout` is null either or a 10-second timeout will be used, if it is a less than or equal to zero then no timeout will be applied. When applying the timeout the greatest of one millisecond and the value of `connectTimeout` will be used.\n\nThe default connection timeout is 10 seconds." returns: description: "The connection timeout of a request to be sent." type: "Duration" - uid: "com.azure.core.util.HttpClientOptions.getConnectionIdleTimeout()" fullName: "com.azure.core.util.HttpClientOptions.getConnectionIdleTimeout()" name: "getConnectionIdleTimeout()" nameWithType: "HttpClientOptions.getConnectionIdleTimeout()" summary: "Gets the duration of time before an idle connection is closed." syntax: "public Duration getConnectionIdleTimeout()" desc: "Gets the duration of time before an idle connection is closed.\n\nThe default connection idle timeout is 60 seconds." returns: description: "The connection idle timeout duration." type: "Duration" - uid: "com.azure.core.util.HttpClientOptions.getHttpClientProvider()" fullName: "com.azure.core.util.HttpClientOptions.getHttpClientProvider()" name: "getHttpClientProvider()" nameWithType: "HttpClientOptions.getHttpClientProvider()" summary: "Gets type of the implementation that should be used to construct an instance of ." syntax: "public Class getHttpClientProvider()" desc: "Gets type of the implementation that should be used to construct an instance of ." returns: description: "The implementation used to create an instance of ." type: "Class<>" - uid: "com.azure.core.util.HttpClientOptions.getMaximumConnectionPoolSize()" fullName: "com.azure.core.util.HttpClientOptions.getMaximumConnectionPoolSize()" name: "getMaximumConnectionPoolSize()" nameWithType: "HttpClientOptions.getMaximumConnectionPoolSize()" summary: "Gets the maximum connection pool size used by the underlying HTTP client." syntax: "public Integer getMaximumConnectionPoolSize()" desc: "Gets the maximum connection pool size used by the underlying HTTP client.\n\nModifying the maximum connection pool size may have effects on the performance of an application. Increasing the maximum connection pool will result in more connections being available for an application but may result in more contention for network resources. It is recommended to perform performance analysis on different maximum connection pool sizes to find the right configuration for an application.\n\nThis maximum connection pool size is not a global configuration but an instance level configuration for each created using this .\n\nThe default maximum connection pool size is determined by the underlying HTTP client. Setting the maximum connection pool size to null resets the configuration to use the default determined by the underlying HTTP client." returns: description: "The maximum connection pool size." type: "Integer" - uid: "com.azure.core.util.HttpClientOptions.getProxyOptions()" fullName: "com.azure.core.util.HttpClientOptions.getProxyOptions()" name: "getProxyOptions()" nameWithType: "HttpClientOptions.getProxyOptions()" summary: "Gets the that the will use." syntax: "public ProxyOptions getProxyOptions()" desc: "Gets the that the will use." returns: description: "The proxy options to use." type: "" - uid: "com.azure.core.util.HttpClientOptions.getReadTimeout()" fullName: "com.azure.core.util.HttpClientOptions.getReadTimeout()" name: "getReadTimeout()" nameWithType: "HttpClientOptions.getReadTimeout()" summary: "Gets the read timeout duration used when reading the server response." syntax: "public Duration getReadTimeout()" desc: "Gets the read timeout duration used when reading the server response.\n\nThe default read timeout is 60 seconds." returns: description: "The read timeout duration." type: "Duration" - uid: "com.azure.core.util.HttpClientOptions.getResponseTimeout()" fullName: "com.azure.core.util.HttpClientOptions.getResponseTimeout()" name: "getResponseTimeout()" nameWithType: "HttpClientOptions.getResponseTimeout()" summary: "Gets the response timeout duration used when waiting for a server to reply." syntax: "public Duration getResponseTimeout()" desc: "Gets the response timeout duration used when waiting for a server to reply.\n\nThe response timeout begins once the request write completes and finishes once the first response read is triggered when the server response is received.\n\nIf `responseTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no timeout will be applied to the response. When applying the timeout the greatest of one millisecond and the value of `responseTimeout` will be used.\n\nThe default response timeout is 60 seconds." returns: description: "The response timeout duration." type: "Duration" - uid: "com.azure.core.util.HttpClientOptions.getWriteTimeout()" fullName: "com.azure.core.util.HttpClientOptions.getWriteTimeout()" name: "getWriteTimeout()" nameWithType: "HttpClientOptions.getWriteTimeout()" summary: "Gets the writing timeout for a request to be sent." syntax: "public Duration getWriteTimeout()" desc: "Gets the writing timeout for a request to be sent.\n\nThe writing timeout does not apply to the entire request but to each emission being sent over the wire. For example a request body which emits `10` `8KB` buffers will trigger `10` write operations, the outbound buffer will be periodically checked to determine if it is still draining.\n\nIf `writeTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no write timeout will be applied. When applying the timeout the greatest of one millisecond and the value of `writeTimeout` will be used.\n\nThe default writing timeout is 60 seconds." returns: description: "The writing timeout of a request to be sent." type: "Duration" - uid: "com.azure.core.util.HttpClientOptions.readTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.readTimeout(Duration readTimeout)" name: "readTimeout(Duration readTimeout)" nameWithType: "HttpClientOptions.readTimeout(Duration readTimeout)" summary: "Sets the read timeout duration used when reading the server response." parameters: - description: "Read timeout duration." name: "readTimeout" type: "Duration" syntax: "public HttpClientOptions readTimeout(Duration readTimeout)" desc: "Sets the read timeout duration used when reading the server response.\n\nThe read timeout begins once the first response read is triggered after the server response is received. This timeout triggers periodically but won't fire its operation if another read operation has completed between when the timeout is triggered and completes.\n\nIf `readTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no timeout period will be applied to response read. When applying the timeout the greatest of one millisecond and the value of `readTimeout` will be used.\n\nThe default read timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.responseTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.responseTimeout(Duration responseTimeout)" name: "responseTimeout(Duration responseTimeout)" nameWithType: "HttpClientOptions.responseTimeout(Duration responseTimeout)" summary: "Sets the response timeout duration used when waiting for a server to reply." parameters: - description: "Response timeout duration." name: "responseTimeout" type: "Duration" syntax: "public HttpClientOptions responseTimeout(Duration responseTimeout)" desc: "Sets the response timeout duration used when waiting for a server to reply.\n\nThe response timeout begins once the request write completes and finishes once the first response read is triggered when the server response is received.\n\nIf `responseTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no timeout will be applied to the response. When applying the timeout the greatest of one millisecond and the value of `responseTimeout` will be used.\n\nThe default response timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setApplicationId(java.lang.String)" fullName: "com.azure.core.util.HttpClientOptions.setApplicationId(String applicationId)" name: "setApplicationId(String applicationId)" nameWithType: "HttpClientOptions.setApplicationId(String applicationId)" summary: "Sets the application ID." overridden: "com.azure.core.util.ClientOptions.setApplicationId(java.lang.String)" parameters: - name: "applicationId" type: "String" syntax: "public HttpClientOptions setApplicationId(String applicationId)" desc: "Sets the application ID.\n\nThe `applicationId` is used to configure for telemetry/monitoring purposes.\n\nSee [Azure Core: Telemetry policy][Azure Core_ Telemetry policy] for additional information.\n\n**Code Samples**\n\nCreate ClientOptions with application ID 'myApplicationId'\n\n```java\nClientOptions clientOptions = new ClientOptions()\n .setApplicationId(\"myApplicationId\");\n```\n\n\n[Azure Core_ Telemetry policy]: https://azure.github.io/azure-sdk/general_azurecore.html#telemetry-policy" returns: type: "" - uid: "com.azure.core.util.HttpClientOptions.setConfiguration(com.azure.core.util.Configuration)" fullName: "com.azure.core.util.HttpClientOptions.setConfiguration(Configuration configuration)" name: "setConfiguration(Configuration configuration)" nameWithType: "HttpClientOptions.setConfiguration(Configuration configuration)" summary: "Sets the configuration store that the will use." parameters: - description: "The configuration store to use." name: "configuration" type: "" syntax: "public HttpClientOptions setConfiguration(Configuration configuration)" desc: "Sets the configuration store that the will use." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setConnectTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.setConnectTimeout(Duration connectTimeout)" name: "setConnectTimeout(Duration connectTimeout)" nameWithType: "HttpClientOptions.setConnectTimeout(Duration connectTimeout)" summary: "Sets the connection timeout for a request to be sent." parameters: - description: "Connect timeout duration." name: "connectTimeout" type: "Duration" syntax: "public HttpClientOptions setConnectTimeout(Duration connectTimeout)" desc: "Sets the connection timeout for a request to be sent.\n\nThe connection timeout begins once the request attempts to connect to the remote host and finishes when the connection is resolved.\n\nIf `connectTimeout` is null either or a 10-second timeout will be used, if it is a less than or equal to zero then no timeout will be applied. When applying the timeout the greatest of one millisecond and the value of `connectTimeout` will be used.\n\nThe default connection timeout is 10 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setConnectionIdleTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.setConnectionIdleTimeout(Duration connectionIdleTimeout)" name: "setConnectionIdleTimeout(Duration connectionIdleTimeout)" nameWithType: "HttpClientOptions.setConnectionIdleTimeout(Duration connectionIdleTimeout)" summary: "Sets the duration of time before an idle connection." parameters: - description: "The connection idle timeout duration." name: "connectionIdleTimeout" type: "Duration" syntax: "public HttpClientOptions setConnectionIdleTimeout(Duration connectionIdleTimeout)" desc: "Sets the duration of time before an idle connection.\n\nThe connection idle timeout begins once the connection has completed its last network request. Every time the connection is used the idle timeout will reset.\n\nIf `connectionIdleTimeout` is null a 60-second timeout will be used, if it is a less than or equal to zero then no timeout period will be applied. When applying the timeout the greatest of one millisecond and the value of `connectionIdleTimeout` will be used.\n\nThe default connection idle timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setHeaders(java.lang.Iterable)" fullName: "com.azure.core.util.HttpClientOptions.setHeaders(Iterable
headers)" name: "setHeaders(Iterable
headers)" nameWithType: "HttpClientOptions.setHeaders(Iterable
headers)" summary: "Sets the ." overridden: "com.azure.core.util.ClientOptions.setHeaders(java.lang.Iterable)" parameters: - name: "headers" type: "Iterable<>" syntax: "public HttpClientOptions setHeaders(Iterable
headers)" desc: "Sets the .\n\nThe passed headers are applied to each request sent with the client.\n\nThis overwrites all previously set headers.\n\n**Code Samples**\n\nCreate ClientOptions with Header 'myCustomHeader':'myStaticValue'\n\n```java\nClientOptions clientOptions = new ClientOptions()\n .setHeaders(Collections.singletonList(new Header(\"myCustomHeader\", \"myStaticValue\")));\n```" returns: type: "" - uid: "com.azure.core.util.HttpClientOptions.setHttpClientProvider(java.lang.Class)" fullName: "com.azure.core.util.HttpClientOptions.setHttpClientProvider(Class httpClientProvider)" name: "setHttpClientProvider(Class httpClientProvider)" nameWithType: "HttpClientOptions.setHttpClientProvider(Class httpClientProvider)" summary: "Sets the type of the implementation that should be used to construct an instance of ." parameters: - description: "The implementation used to create an instance of\n ." name: "httpClientProvider" type: "Class<>" syntax: "public HttpClientOptions setHttpClientProvider(Class httpClientProvider)" desc: "Sets the type of the implementation that should be used to construct an instance of . If the value isn't set or is an empty string the first resolved by [ServiceLoader][] will be used to create an instance of . If the value is set and doesn't match any resolved by [ServiceLoader][] an will be thrown when attempting to create an instance of .\n\n\n[ServiceLoader]: https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html" returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setMaximumConnectionPoolSize(java.lang.Integer)" fullName: "com.azure.core.util.HttpClientOptions.setMaximumConnectionPoolSize(Integer maximumConnectionPoolSize)" name: "setMaximumConnectionPoolSize(Integer maximumConnectionPoolSize)" nameWithType: "HttpClientOptions.setMaximumConnectionPoolSize(Integer maximumConnectionPoolSize)" summary: "Sets the maximum connection pool size used by the underlying HTTP client." parameters: - description: "The maximum connection pool size." name: "maximumConnectionPoolSize" type: "Integer" syntax: "public HttpClientOptions setMaximumConnectionPoolSize(Integer maximumConnectionPoolSize)" desc: "Sets the maximum connection pool size used by the underlying HTTP client.\n\nModifying the maximum connection pool size may have effects on the performance of an application. Increasing the maximum connection pool will result in more connections being available for an application but may result in more contention for network resources. It is recommended to perform performance analysis on different maximum connection pool sizes to find the right configuration for an application.\n\nThis maximum connection pool size is not a global configuration but an instance level configuration for each created using this .\n\nThe default maximum connection pool size is determined by the underlying HTTP client. Setting the maximum connection pool size to null resets the configuration to use the default determined by the underlying HTTP client." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setProxyOptions(com.azure.core.http.ProxyOptions)" fullName: "com.azure.core.util.HttpClientOptions.setProxyOptions(ProxyOptions proxyOptions)" name: "setProxyOptions(ProxyOptions proxyOptions)" nameWithType: "HttpClientOptions.setProxyOptions(ProxyOptions proxyOptions)" summary: "Sets the that the will use." parameters: - description: "The proxy options to use." name: "proxyOptions" type: "" syntax: "public HttpClientOptions setProxyOptions(ProxyOptions proxyOptions)" desc: "Sets the that the will use." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setReadTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.setReadTimeout(Duration readTimeout)" name: "setReadTimeout(Duration readTimeout)" nameWithType: "HttpClientOptions.setReadTimeout(Duration readTimeout)" summary: "Sets the read timeout duration used when reading the server response." parameters: - description: "Read timeout duration." name: "readTimeout" type: "Duration" syntax: "public HttpClientOptions setReadTimeout(Duration readTimeout)" desc: "Sets the read timeout duration used when reading the server response.\n\nThe read timeout begins once the first response read is triggered after the server response is received. This timeout triggers periodically but won't fire its operation if another read operation has completed between when the timeout is triggered and completes.\n\nIf `readTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no timeout period will be applied to response read. When applying the timeout the greatest of one millisecond and the value of `readTimeout` will be used.\n\nThe default read timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setResponseTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.setResponseTimeout(Duration responseTimeout)" name: "setResponseTimeout(Duration responseTimeout)" nameWithType: "HttpClientOptions.setResponseTimeout(Duration responseTimeout)" summary: "Sets the response timeout duration used when waiting for a server to reply." parameters: - description: "Response timeout duration." name: "responseTimeout" type: "Duration" syntax: "public HttpClientOptions setResponseTimeout(Duration responseTimeout)" desc: "Sets the response timeout duration used when waiting for a server to reply.\n\nThe response timeout begins once the request write completes and finishes once the first response read is triggered when the server response is received.\n\nIf `responseTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no timeout will be applied to the response. When applying the timeout the greatest of one millisecond and the value of `responseTimeout` will be used.\n\nThe default response timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" - uid: "com.azure.core.util.HttpClientOptions.setWriteTimeout(java.time.Duration)" fullName: "com.azure.core.util.HttpClientOptions.setWriteTimeout(Duration writeTimeout)" name: "setWriteTimeout(Duration writeTimeout)" nameWithType: "HttpClientOptions.setWriteTimeout(Duration writeTimeout)" summary: "Sets the writing timeout for a request to be sent." parameters: - description: "Write operation timeout duration." name: "writeTimeout" type: "Duration" syntax: "public HttpClientOptions setWriteTimeout(Duration writeTimeout)" desc: "Sets the writing timeout for a request to be sent.\n\nThe writing timeout does not apply to the entire request but to each emission being sent over the wire. For example a request body which emits `10` `8KB` buffers will trigger `10` write operations, the outbound buffer will be periodically checked to determine if it is still draining.\n\nIf `writeTimeout` is null either or a 60-second timeout will be used, if it is a less than or equal to zero then no write timeout will be applied. When applying the timeout the greatest of one millisecond and the value of `writeTimeout` will be used.\n\nThe default writing timeout is 60 seconds." returns: description: "The updated HttpClientOptions object." type: "" type: "class" desc: "General configuration options for .\n\n implementations may not support all configuration options in this class." metadata: {} package: "com.azure.core.util" artifact: com.azure:azure-core:1.54.0