HttpClient will make connections.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private int | |
| private boolean | |
| public static final List | DEFAULT_ALPN_VERSIONS
Default Application-Layer Protocol Negotiation versions = [] (automatic according to protocol version) |
| public static final int | DEFAULT_DECODER_INITIAL_BUFFER_SIZE
Default initial buffer size for HttpObjectDecoder = 128 bytes |
| public static final boolean | DEFAULT_DECOMPRESSION_SUPPORTED
Whether the client should send requests with an |
| public static final String | DEFAULT_DEFAULT_HOST
The default value for host name = "localhost" |
| public static final int | DEFAULT_DEFAULT_PORT
The default value for port = 80 |
| public static final boolean | |
| public static final boolean | DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE
Default using HTTP/1.1 upgrade for establishing an h2C connection = |
| public static final boolean | DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE_WITH_PREFLIGHT_REQUEST
Default to use a preflight OPTIONS request for h2C without prior knowledge connection = |
| public static final int | DEFAULT_HTTP2_CONNECTION_WINDOW_SIZE
The default connection window size for HTTP/2 = -1 |
| public static final int | DEFAULT_HTTP2_KEEP_ALIVE_TIMEOUT
The default keep alive timeout for HTTP/2 connection can send = 60 seconds |
| public static final int | DEFAULT_HTTP2_MAX_POOL_SIZE
The default maximum number of connections an HTTP/2 client will pool = 1 |
| public static final int | DEFAULT_HTTP2_MULTIPLEXING_LIMIT
The default maximum number of concurrent streams per connection for HTTP/2 = -1 |
| public static final boolean | DEFAULT_KEEP_ALIVE
Default value of whether keep-alive is enabled = |
| public static final int | DEFAULT_KEEP_ALIVE_TIMEOUT
The default keep alive timeout for HTTP/1.1 connection can send = 60 seconds |
| public static final int | DEFAULT_MAX_CHUNK_SIZE
Default max HTTP chunk size = 8192 |
| public static final int | DEFAULT_MAX_HEADER_SIZE
Default max length of all headers = 8192 |
| public static final int | DEFAULT_MAX_INITIAL_LINE_LENGTH
Default max length of the initial line (e.g. |
| public static final int | DEFAULT_MAX_POOL_SIZE
The default maximum number of HTTP/1 connections a client will pool = 5 |
| public static final int | |
| public static final int | DEFAULT_MAX_WAIT_QUEUE_SIZE
Default max wait queue size = -1 (unbounded) |
| public static final int | DEFAULT_MAX_WEBSOCKET_FRAME_SIZE
The default value for maximum WebSocket frame size = 65536 bytes |
| public static final int | DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZE
The default value for maximum WebSocket messages (could be assembled from multiple frames) is 4 full frames worth of data |
| public static final int | DEFAULT_MAX_WEBSOCKETS
The default value for the maximum number of WebSocket = 50 |
| public static final String | DEFAULT_NAME
Actual name of anonymous shared client = |
| public static final boolean | DEFAULT_PIPELINING
Default value of whether pipe-lining is enabled = |
| public static final int | DEFAULT_PIPELINING_LIMIT
The default maximum number of requests an HTTP/1.1 pipe-lined connection can send = 10 |
| public static final int | DEFAULT_POOL_CLEANER_PERIOD
Default pool cleaner period = 1000 ms (1 second) |
| public static final int | DEFAULT_POOL_EVENT_LOOP_SIZE
Default pool event loop size = 0 (reuse current event-loop) |
| public static final HttpVersion | DEFAULT_PROTOCOL_VERSION
The default protocol version = HTTP/1.1 |
| public static final boolean | DEFAULT_SEND_UNMASKED_FRAMES
Default WebSocket masked bit is true as depicted by RFC = |
| public static final boolean | DEFAULT_SHARED
Default shared client = |
| public static final TracingPolicy | DEFAULT_TRACING_POLICY
Default tracing control = |
| public static final boolean | DEFAULT_TRY_USE_COMPRESSION
Deprecated
as of 4.5, use Default value of whether the client will attempt to use compression = DEFAULT_DECOMPRESSION_SUPPORTED
false
|
| public static final boolean | DEFAULT_TRY_USE_PER_FRAME_WEBSOCKET_COMPRESSION
Default offer WebSocket per-frame deflate compression extension = |
| public static final boolean | DEFAULT_TRY_USE_PER_MESSAGE_WEBSOCKET_COMPRESSION
Default offer WebSocket per-message deflate compression extension = |
| public static final boolean | DEFAULT_VERIFY_HOST
Default value of whether hostname verification (for SSL/TLS) is enabled = |
| public static final boolean | DEFAULT_WEBSOCKET_ALLOW_CLIENT_NO_CONTEXT
Default offering of the |
| public static final int | DEFAULT_WEBSOCKET_CLOSING_TIMEOUT
Default WebSocket closing timeout = 10 second |
| public static final int | DEFAULT_WEBSOCKET_COMPRESSION_LEVEL
Default WebSocket deflate compression level = 6 |
| public static final boolean | DEFAULT_WEBSOCKET_REQUEST_SERVER_NO_CONTEXT
Default offering of the |
| private String | |
| private int | |
| private boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private int | |
| private int | |
| private Http2Settings | |
| private boolean | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private String | |
| private boolean | |
| private int | |
| private PoolOptions | |
| private HttpVersion | |
| private boolean | |
| private boolean | |
| private TracingPolicy | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | HttpClientOptions(JsonObject
the JSON json)
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Constructor to create an options from JSON |
| Modifier and Type | Method and Description |
|---|---|
| public HttpClientOptions | addCrlPath(String
the path crlPath)Overrides io. Add a CRL path |
| public HttpClientOptions | addCrlValue(Buffer
the value crlValue)Overrides io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Add a CRL value |
| public HttpClientOptions | addEnabledCipherSuite(String
the suite suite)Overrides io. Add an enabled cipher suite, appended to the ordered suites. |
| public HttpClientOptions | addEnabledSecureTransportProtocol(final String
the SSL/TLS protocol to enable protocol)Overrides io. Add an enabled SSL/TLS protocols, appended to the ordered protocols. |
| public HttpClientOptions | addNonProxyHost(String
the added host nonProxyHost)Overrides io. Add a |
| public List | Returns: the list of protocol versions to provide during the Application-Layer Protocol Negotiation. When the list is empty, the client provides a best effort list according tosetProtocolVersion
|
| public int | |
| public String | Returns: the default host nameGet the default host name to be used by this client in requests if none is provided when making the request. |
| public int | Returns: the default portGet the default port to be used by this client in requests if none is provided when making the request. |
| public int | |
| public int | |
| public int | |
| public int | Returns: the maximum number of concurrent streams for an HTTP/2 connection,-1 means
the value sent by the server
|
| public Http2Settings | |
| public int | |
| public int | |
| public int | |
| public int | Returns: the maximum length of the initial line for HTTP/1.x (e.g."GET / HTTP/1.0")
|
| public int | |
| public int | |
| public int | |
| public int | Returns: the max WebSocket frame sizeGet the maximum WebSocket frame size to use |
| public int | Returns: the max WebSocket message sizeGet the maximum WebSocket message size to use |
| public int | |
| public String | |
| public int | |
| public int | |
| public int | Returns: the max number of event-loop a pool will use, the default value is0 which implies
to reuse the current event-loop
|
| public PoolOptions | |
| public HttpVersion | |
| public TracingPolicy | |
| public boolean | Returns: true when the WebSocket per-frame deflate compression extension will be offered
|
| public boolean | Returns: true when the WebSocket per-message deflate compression extension will be offered
|
| public boolean | Returns: true when the WebSocket per-frame deflate compression extension will be offered
Deprecated
instead use
tryUsePerFrameWebSocketCompression
|
| public int | Returns: the amount of time (in seconds) a client WebSocket will wait until it closes TCP connection after receiving a close frame
|
| public boolean | Returns: true when the client_no_context_takeover parameter for the WebSocket per-message
deflate compression extension will be offered
|
| public int | |
| public boolean | Returns: true when the server_no_context_takeover parameter for the WebSocket per-message
deflate compression extension will be offered
|
| private void | |
| public boolean | Returns: true if the client should send requests with an accepting-encoding header set to a compression algorithm, false otherwise
|
| public boolean | |
| public boolean | Returns: true when an h2c connection is established using an HTTP/1.1 upgrade request, false when directly
|
| public boolean | Returns: true when an h2c connection established using an HTTP/1.1 upgrade request should perform
a preflight OPTIONS request to the origin server to establish the h2c connection
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isTryUseCompression()
Deprecated
as of 4.5, use
isDecompressionSupported instead
Is compression enabled on the client? |
| public boolean | |
| public HttpClientOptions | removeEnabledCipherSuite(String
the suite suite)Overrides io. Removes an enabled cipher suite from the ordered suites. |
| public HttpClientOptions | removeEnabledSecureTransportProtocol(String
the SSL/TLS protocol to disable protocol)Overrides io. Removes an enabled SSL/TLS protocol from the ordered protocols. |
| public HttpClientOptions | setActivityLogDataFormat(ByteBufFormat
the format to use activityLogDataFormat)Overrides io. Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe versions alpnVersions)Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation. |
| public HttpClientOptions | setConnectTimeout(int
connect timeout, in ms connectTimeout)Overrides io. Set the connect timeout |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe initial buffer size decoderInitialBufferSize)set to |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if the client should send a request with an accepting-encoding header set to a compression algorithm, false otherwiseWhether the client should send requests with an |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlySet the default host name to be used by this client in requests if none is provided when making the request. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlySet the default port to be used by this client in requests if none is provided when making the request. |
| public HttpClientOptions | setEnabledSecureTransportProtocols(Set<String>
the SSL/TLS protocols to enable enabledSecureTransportProtocols)Overrides io. Sets the list of enabled SSL/TLS protocols. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue when the client should always use SNI on TLS/SSL connectionsBy default, the server name is only sent for Fully Qualified Domain Name (FQDN), setting
this property to |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe upgrade value value)Set to |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe upgrade value value)Set to |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe window size applied to the connection http2ConnectionWindowSize)Set the default HTTP/2 connection window size. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe timeout, in seconds keepAliveTimeout)Set the keep alive timeout for HTTP/2 connections, in seconds. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum pool size max)Set the maximum pool size for HTTP/2 connections |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum concurrent for an HTTP/2 connection limit)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. |
| public HttpClientOptions | setIdleTimeout(int
the timeout idleTimeout)Overrides io. Set the idle timeout, default time unit is seconds. |
| public HttpClientOptions | setIdleTimeoutUnit(TimeUnit
specify time unit. idleTimeoutUnit)Overrides io. Set the idle timeout unit. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe settings value settings)Set the HTTP/2 connection settings immediately sent by to the server when the client connects. |
| public HttpClientOptions | setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
Overrides io.
Deprecated
|
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabledSet whether keep alive is enabled on the client |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe timeout, in seconds keepAliveTimeout)Set the keep alive timeout for HTTP/1.x, in seconds. |
| public HttpClientOptions | setKeyCertOptions(KeyCertOptions
the key store options options)Overrides io. Set the key/cert options. |
| public HttpClientOptions | setKeyStoreOptions(JksOptions
the key store in jks format options)Overrides io.
Deprecated
Set the key/cert options in jks format, aka Java keystore. |
| public HttpClientOptions | setLocalAddress(String
the local address localAddress)Overrides io. Set the local interface to bind for network connections. |
| public HttpClientOptions | setLogActivity(boolean
true for logging the network activity logEnabled)Overrides io. Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum chunk size maxChunkSize)Set the maximum HTTP chunk size |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe new maximum length maxHeaderSize)Set the maximum length of all headers for HTTP/1.x . |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe new maximum initial length maxInitialLineLength)Set the maximum length of the initial line for HTTP/1.x (e.g. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum pool size maxPoolSize)Set the maximum pool size for connections |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum number of redirection maxRedirects)Set to |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe maximum number of waiting requests maxWaitQueueSize)Set the maximum requests allowed in the wait queue, any requests beyond the max size will result in a ConnectionPoolTooBusyException. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe max frame size, in bytes maxWebSocketFrameSize)Set the max WebSocket frame size |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe max message size, in bytes maxWebSocketMessageSize)Set the max WebSocket message size |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe max value maxWebSockets)Set the max number of WebSockets per endpoint. |
| public HttpClientOptions | setMetricsName(String
the metrics name metricsName)Overrides io. Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name. |
| public HttpClientOptions | |
| public HttpClientOptions | setNonProxyHosts(List<String>
the list of non proxies hosts nonProxyHosts)Overrides io. Set a list of remote hosts that are not proxied when the client is configured to use a proxy. |
| public HttpClientOptions | setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Overrides io.
Deprecated
|
| public HttpClientOptions | setPemKeyCertOptions(PemKeyCertOptions
the options in pem format options)Overrides io.
Deprecated
Set the key/cert store options in pem format. |
| public HttpClientOptions | setPemTrustOptions(PemTrustOptions
the trust options in pem format options)Overrides io.
Deprecated
Set the trust options in pem format |
| public HttpClientOptions | setPfxKeyCertOptions(PfxOptions
the key cert options in pfx format options)Overrides io.
Deprecated
Set the key/cert options in pfx format. |
| public HttpClientOptions | setPfxTrustOptions(PfxOptions
the trust options in pfx format options)Overrides io.
Deprecated
Set the trust options in pfx format |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabledSet whether pipe-lining is enabled on the client |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe limit of pending requests limit)Set the limit of pending requests a pipe-lined HTTP/1 connection can send. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe pool cleaner period 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. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe new size poolEventLoopSize)Set the number of event-loop the pool use. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe protocol version protocolVersion)Set the protocol version. |
| public HttpClientOptions | setProxyOptions(ProxyOptions
proxy options object proxyOptions)Overrides io. Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy. |
| public HttpClientOptions | setReadIdleTimeout(int
the read timeout idleTimeout)Overrides io. Set the read idle timeout, default time unit is seconds. |
| public HttpClientOptions | setReceiveBufferSize(int
the buffers size, in bytes receiveBufferSize)Overrides io. Set the TCP receive buffer size |
| public HttpClientOptions | setReuseAddress(boolean
the value of reuse address reuseAddress)Overrides io. Set the value of reuse address |
| public HttpClientOptions | setReusePort(boolean
the value of reuse port reusePort)Overrides io. Set the value of reuse port. |
| public HttpClientOptions | setSendBufferSize(int
the buffers size, in bytes sendBufferSize)Overrides io. Set the TCP send buffer size |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabled sendUnmaskedFrames)Set |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue to use a shared clientSet to |
| public HttpClientOptions | setSoLinger(int
true if SO_linger is enabled soLinger)Overrides io. Set whether SO_linger keep alive is enabled |
| public HttpClientOptions | setSsl(boolean
true if enabled ssl)Overrides io. Set whether SSL/TLS is enabled |
| public HttpClientOptions | setSslEngineOptions(SSLEngineOptions
the ssl engine to use sslEngineOptions)Overrides io. Set to use SSL engine implementation to use. |
| public HttpClientOptions | setSslHandshakeTimeout(long
the SSL handshake timeout to set, in milliseconds sslHandshakeTimeout)Overrides io. Set the SSL handshake timeout, default time unit is seconds. |
| public HttpClientOptions | setSslHandshakeTimeoutUnit(TimeUnit
specify time unit. sslHandshakeTimeoutUnit)Overrides io. Set the SSL handshake timeout unit. |
| public HttpClientOptions | setTcpCork(boolean
the cork value tcpCork)Overrides io. Enable the |
| public HttpClientOptions | setTcpFastOpen(boolean
the fast open value tcpFastOpen)Overrides io. Enable the |
| public HttpClientOptions | setTcpKeepAlive(boolean
true if TCP keep alive is enabled tcpKeepAlive)Overrides io. Set whether TCP keep alive is enabled |
| public HttpClientOptions | setTcpNoDelay(boolean
true if TCP no delay is enabled (Nagle disabled) tcpNoDelay)Overrides io. Set whether TCP no delay is enabled |
| public HttpClientOptions | setTcpQuickAck(boolean
the quick ack value tcpQuickAck)Overrides io. Enable the |
| public HttpClientOptions | setTcpUserTimeout(int
the tcp user timeout value tcpUserTimeout)Overrides io. Sets the |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe tracing policy tracingPolicy)Set the tracing policy for the client behavior when Vert.x has tracing enabled. |
| public HttpClientOptions | setTrafficClass(int
the value of traffic class trafficClass)Overrides io. Set the value of traffic class |
| public HttpClientOptions | setTrustAll(boolean
true if all should be trusted trustAll)Overrides io. Set whether all server certificates should be trusted |
| public HttpClientOptions | setTrustOptions(TrustOptions
the trust options options)Overrides io. Set the trust options. |
| public HttpClientOptions | setTrustStoreOptions(JksOptions
the trust options in jks format options)Overrides io.
Deprecated
Set the trust options in jks format, aka Java truststore |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabled
Deprecated
as of 4.5, use
setDecompressionSupported(boolean) instead
Set whether compression is enabled |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue to offer the per-frame deflate compression extensionSet whether the client will offer the WebSocket per-frame deflate compression extension. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue to offer the per-message deflate compression extensionSet whether the client will offer the WebSocket per-message deflate compression extension. |
| public HttpClientOptions | setUseAlpn(boolean
true when Application-Layer Protocol Negotiation should be used useAlpn)Overrides io. Set the ALPN usage. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabledSet whether hostname verification is enabled |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe timeout is seconds webSocketClosingTimeout)Set the amount of time a client WebSocket will wait until it closes the TCP connection after receiving a close frame. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue to offer the client_no_context_takeover parameterSet whether the |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlythe WebSocket deflate compression level compressionLevel)Set the WebSocket deflate compression level. |
| public HttpClientOptions | Returns: a reference to this, so the API can be used fluentlytrue to offer the server_no_context_takeover parameterSet whether the |
| public HttpClientOptions | setWriteIdleTimeout(int
the write timeout idleTimeout)Overrides io. Set the write idle timeout, default time unit is seconds. |
| public JsonObject | Returns: the JSONOverrides io.
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Convert to JSON |