vertx / io.vertx.kotlin.core.http / httpClientOptionsOf

# httpClientOptionsOf

`fun httpClientOptionsOf(alpnVersions: Iterable<HttpVersion>? = null, connectTimeout: Int? = null, crlPaths: Iterable<String>? = null, crlValues: Iterable<Buffer>? = null, decoderInitialBufferSize: Int? = null, defaultHost: String? = null, defaultPort: Int? = null, enabledCipherSuites: Iterable<String>? = null, enabledSecureTransportProtocols: Iterable<String>? = null, forceSni: Boolean? = null, http2ClearTextUpgrade: Boolean? = null, http2ConnectionWindowSize: Int? = null, http2KeepAliveTimeout: Int? = null, http2MaxPoolSize: Int? = null, http2MultiplexingLimit: Int? = null, idleTimeout: Int? = null, idleTimeoutUnit: TimeUnit? = null, initialSettings: Http2Settings? = null, jdkSslEngineOptions: JdkSSLEngineOptions? = null, keepAlive: Boolean? = null, keepAliveTimeout: Int? = null, keyStoreOptions: JksOptions? = null, localAddress: String? = null, logActivity: Boolean? = null, maxChunkSize: Int? = null, maxHeaderSize: Int? = null, maxInitialLineLength: Int? = null, maxPoolSize: Int? = null, maxRedirects: Int? = null, maxWaitQueueSize: Int? = null, maxWebsocketFrameSize: Int? = null, maxWebsocketMessageSize: Int? = null, metricsName: String? = null, openSslEngineOptions: OpenSSLEngineOptions? = null, pemKeyCertOptions: PemKeyCertOptions? = null, pemTrustOptions: PemTrustOptions? = null, pfxKeyCertOptions: PfxOptions? = null, pfxTrustOptions: PfxOptions? = null, pipelining: Boolean? = null, pipeliningLimit: Int? = null, poolCleanerPeriod: Int? = null, protocolVersion: HttpVersion? = null, proxyOptions: ProxyOptions? = null, receiveBufferSize: Int? = null, reuseAddress: Boolean? = null, reusePort: Boolean? = null, sendBufferSize: Int? = null, sendUnmaskedFrames: Boolean? = null, soLinger: Int? = null, ssl: Boolean? = null, sslHandshakeTimeout: Long? = null, sslHandshakeTimeoutUnit: TimeUnit? = null, tcpCork: Boolean? = null, tcpFastOpen: Boolean? = null, tcpKeepAlive: Boolean? = null, tcpNoDelay: Boolean? = null, tcpQuickAck: Boolean? = null, trafficClass: Int? = null, trustAll: Boolean? = null, trustStoreOptions: JksOptions? = null, tryUseCompression: Boolean? = null, tryUsePerFrameWebsocketCompression: Boolean? = null, tryUsePerMessageWebsocketCompression: Boolean? = null, useAlpn: Boolean? = null, usePooledBuffers: Boolean? = null, verifyHost: Boolean? = null, websocketCompressionAllowClientNoContext: Boolean? = null, websocketCompressionLevel: Int? = null, websocketCompressionRequestServerNoContext: Boolean? = null): HttpClientOptions`

A function providing a DSL for building io.vertx.core.http.HttpClientOptions objects.

Options describing how an io.vertx.core.http.HttpClient will make connections.

### Parameters

`alpnVersions` - Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation. When the list is empty, the client provides a best effort list according to io.vertx.core.http.HttpClientOptions: : h2,http/1.1 otherwise: [io.vertx.core.http.HttpClientOptions]

`connectTimeout` - Set the connect timeout

`crlPaths` - Add a CRL path

`crlValues` - Add a CRL value

`decoderInitialBufferSize` - set to initialBufferSizeHttpDecoder the initial buffer of the HttpDecoder.

`defaultHost` - Set the default host name to be used by this client in requests if none is provided when making the request.

`defaultPort` - Set the default port to be used by this client in requests if none is provided when making the request.

`enabledCipherSuites` - Add an enabled cipher suite, appended to the ordered suites.

`enabledSecureTransportProtocols` - Sets the list of enabled SSL/TLS protocols.

`forceSni` - By default, the server name is only sent for Fully Qualified Domain Name (FQDN), setting this property to true forces the server name to be always sent.

`http2ClearTextUpgrade` - Set to true when an h2c connection is established using an HTTP/1.1 upgrade request, and false when an h2c connection is established directly (with prior knowledge).

`http2ConnectionWindowSize` - Set the default HTTP/2 connection window size. It overrides the initial window size set by io.vertx.core.http.Http2Settings, so the connection window size is greater than for its streams, in order the data throughput. A value of -1 reuses the initial window size setting.

`http2KeepAliveTimeout` - Set the keep alive timeout for HTTP/2 connections, in seconds. This value determines how long a connection remains unused in the pool before being evicted and closed.

`http2MaxPoolSize` - Set the maximum pool size for HTTP/2 connections

`http2MultiplexingLimit` - Set a client limit of the number concurrent streams for each HTTP/2 connection, this limits the number of streams the client can create for a connection. The effective number of streams for a connection is the min of this value and the server's initial settings. Setting the value to -1 means to use the value sent by the server's initial settings. -1 is the default value.

`idleTimeout` - Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout. If you want change default time unit, use io.vertx.core.http.HttpClientOptions

`idleTimeoutUnit` - Set the idle timeout unit. If not specified, default is seconds.

`initialSettings` - Set the HTTP/2 connection settings immediately sent by to the server when the client connects.

`jdkSslEngineOptions` -

`keepAlive` - Set whether keep alive is enabled on the client

`keepAliveTimeout` - Set the keep alive timeout for HTTP/1.x, in seconds. This value determines how long a connection remains unused in the pool before being evicted and closed.

`keyStoreOptions` - Set the key/cert options in jks format, aka Java keystore.

`localAddress` - Set the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.

`logActivity` - Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

`maxChunkSize` - Set the maximum HTTP chunk size

`maxHeaderSize` - Set the maximum length of all headers for HTTP/1.x .

`maxInitialLineLength` - Set the maximum length of the initial line for HTTP/1.x (e.g. "HTTP/1.1 200 OK")

`maxPoolSize` - Set the maximum pool size for connections

`maxRedirects` - Set to maxRedirects the maximum number of redirection a request can follow.

`maxWaitQueueSize` - Set the maximum requests allowed in the wait queue, any requests beyond the max size will result in a ConnectionPoolTooBusyException. If the value is set to a negative number then the queue will be unbounded.

`maxWebsocketFrameSize` - Set the max WebSocket frame size

`maxWebsocketMessageSize` - Set the max WebSocket message size

`metricsName` - Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.

`openSslEngineOptions` -

`pemKeyCertOptions` - Set the key/cert store options in pem format.

`pemTrustOptions` - Set the trust options in pem format

`pfxKeyCertOptions` - Set the key/cert options in pfx format.

`pfxTrustOptions` - Set the trust options in pfx format

`pipelining` - Set whether pipe-lining is enabled on the client

`pipeliningLimit` - Set the limit of pending requests a pipe-lined HTTP/1 connection can send.

`poolCleanerPeriod` - Set the connection pool cleaner period in milli seconds, a non positive value disables expiration checks and connections will remain in the pool until they are closed.

`protocolVersion` - Set the protocol version.

`proxyOptions` - Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.

`receiveBufferSize` - Set the TCP receive buffer size

`reuseAddress` - Set the value of reuse address

`reusePort` - Set the value of reuse port. This is only supported by native transports.

`sendBufferSize` - Set the TCP send buffer size

`sendUnmaskedFrames` - Set true when the client wants to skip frame masking. You may want to set it true on server by server WebSocket communication: in this case you are by passing RFC6455 protocol. It's false as default.

`soLinger` - Set whether SO_linger keep alive is enabled

`ssl` - Set whether SSL/TLS is enabled

`sslHandshakeTimeout` - Set the SSL handshake timeout, default time unit is seconds.

`sslHandshakeTimeoutUnit` - Set the SSL handshake timeout unit. If not specified, default is seconds.

`tcpCork` - Enable the TCP_CORK option - only with linux native transport.

`tcpFastOpen` - Enable the TCP_FASTOPEN option - only with linux native transport.

`tcpKeepAlive` - Set whether TCP keep alive is enabled

`tcpNoDelay` - Set whether TCP no delay is enabled

`tcpQuickAck` - Enable the TCP_QUICKACK option - only with linux native transport.

`trafficClass` - Set the value of traffic class

`trustAll` - Set whether all server certificates should be trusted

`trustStoreOptions` - Set the trust options in jks format, aka Java truststore

`tryUseCompression` - Set whether compression is enabled

`tryUsePerFrameWebsocketCompression` - Set whether the client will offer the WebSocket per-frame deflate compression extension.

`tryUsePerMessageWebsocketCompression` - Set whether the client will offer the WebSocket per-message deflate compression extension.

`useAlpn` - Set the ALPN usage.

`usePooledBuffers` - Set whether Netty pooled buffers are enabled

`verifyHost` - Set whether hostname verification is enabled

`websocketCompressionAllowClientNoContext` - Set whether the client_no_context_takeover parameter of the WebSocket per-message deflate compression extension will be offered.

`websocketCompressionLevel` - Set the Websocket deflate compression level.

`websocketCompressionRequestServerNoContext` - Set whether the server_no_context_takeover parameter of the WebSocket per-message deflate compression extension will be offered.