The internal type of the Java wrapped class.
The internal type of the Java wrapped class.
The internal instance of the Java wrapped class.
The internal instance of the Java wrapped class.
Close the HTTP client.
Close the HTTP client. This will cause any pooled HTTP connections to be closed.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP CONNECT request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP CONNECT request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
Attempt to connect an HTML5 websocket to the specified URI
Attempt to connect an HTML5 websocket to the specified URI
This version of the method allows you to specify the websockets version using the wsVersion parameter
You can also specify a set of headers to append to the upgrade request
The connect is done asynchronously and wsConnect
is called back with the websocket
Attempt to connect an HTML5 websocket to the specified URI
Attempt to connect an HTML5 websocket to the specified URI
This version of the method allows you to specify the websockets version using the wsVersion parameter
The connect is done asynchronously and wsConnect
is called back with the websocket
Attempt to connect an HTML5 websocket to the specified URI
Attempt to connect an HTML5 websocket to the specified URI
The connect is done asynchronously and wsConnect
is called back with the websocket
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP DELETE request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP DELETE request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
Set an exception handler
Set an exception handler
A reference to this, so multiple invocations can be chained together.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP GET request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP GET request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
The connect timeout in milliseconds
The host
Get the key store password
Get the key store path
Returns the maximum number of connections in the pool
Get the maximum websocket frame size in bytes.
This method works in the same manner as org.vertx.java.core.Handler),
except that it allows you specify a set of headers
that will be sent with the request.
This is a quick version of the org.vertx.java.core.Handler) method where you do not want to do anything with the request before sending.
This is a quick version of the org.vertx.java.core.Handler) method where you do not want to do anything with the request before sending.
Normally with any of the HTTP methods you create the request then when you are ready to send it you call org.vertx.scala.core.http.HttpClientRequest.end() on it. With this method the request is immediately sent.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
The port
The receive buffer size
The send buffer size
the value of TCP so linger
the value of traffic class
Get trust store password
Get the trust store path
Returns true
if the org.vertx.scala.core.http.HttpClient should try to use compression.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP HEAD request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP HEAD request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
Is the client keep alive?
The value of reuse address
Is SSL enabled?
true if TCP keep alive is enabled
true if Nagle's algorithm is disabled.
true if this client will trust all server certificates.
true
if pooled buffers are used
true if this client will validate the remote server's certificate hostname against the requested host
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP OPTIONS request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP OPTIONS request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP PATCH request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP PATCH request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP POST request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP POST request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP PUT request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP PUT request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP request with the specified uri
.
The specific HTTP method (e.g. GET, POST, PUT etc) is specified using the parameter method
When an HTTP response is received from the server the responseHandler
is called passing in the response.
Because of the nature of CONNECT, the connection is automatically upgraded to raw TCP if a response code of 200 is received from the
remote peer. In this case you are able to get hold of the raw TCP socket via calling HttpClientResponse#netSocket()
.
Set the connect timeout in milliseconds.
Set the connect timeout in milliseconds.
a reference to this so multiple method calls can be chained together
Set the host that the client will attempt to connect to the server on to host
.
Set the host that the client will attempt to connect to the server on to host
. The default value is
localhost
A reference to this, so multiple invocations can be chained together.
If keepAlive
is true
then, after the request has ended the connection will be returned to the pool
where it can be used by another request.
If keepAlive
is true
then, after the request has ended the connection will be returned to the pool
where it can be used by another request. In this manner, many HTTP requests can be pipe-lined over an HTTP connection.
Keep alive connections will not be closed until the org.vertx.scala.core.http.HttpClient.close() method is invoked.
If keepAlive
is false
then a new connection will be created for each request and it won't ever go in the pool,
the connection will closed after the response has been received. Even with no keep alive,
the client will not allow more than org.vertx.scala.core.http.HttpClient.getMaxPoolSize() connections to be created at any one time.
A reference to this, so multiple invocations can be chained together.
Set the password for the SSL key store.
Set the password for the SSL key store. This method should only be used in SSL mode, i.e. after
org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true
.
A reference to this, so multiple invocations can be chained together.
Set the path to the SSL key store.
Set the path to the SSL key store. This method should only be used in SSL
mode, i.e. after org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true
.
The SSL key store is a standard Java Key Store, and will contain the client certificate. Client certificates are only required if the server requests client authentication.
A reference to this, so multiple invocations can be chained together.
Set the maximum pool size
Set the maximum pool size
The client will maintain up to maxConnections
HTTP connections in an internal pool
A reference to this, so multiple invocations can be chained together.
Sets the maximum websocket frame size in bytes.
Sets the maximum websocket frame size in bytes. Default is 65536 bytes.
The size in bytes
Set the port that the client will attempt to connect to the server on to port
.
Set the port that the client will attempt to connect to the server on to port
. The default value is
80
A reference to this, so multiple invocations can be chained together.
Set the receive buffer size for connections created by this instance to size
in bytes.
Set the receive buffer size for connections created by this instance to size
in bytes.
a reference to this so multiple method calls can be chained together
Set the reuseAddress setting for connections created by this instance to reuse
.
Set the reuseAddress setting for connections created by this instance to reuse
.
a reference to this so multiple method calls can be chained together
If ssl
is true
, this signifies that any connections will be SSL connections.
If ssl
is true
, this signifies that any connections will be SSL connections.
A reference to this, so multiple invocations can be chained together.
Set the send buffer size for connections created by this instance to size
in bytes.
Set the send buffer size for connections created by this instance to size
in bytes.
a reference to this so multiple method calls can be chained together
Set the TCP soLinger setting for connections created by this instance to linger
.
Set the TCP soLinger setting for connections created by this instance to linger
.
Using a negative value will disable soLinger.
a reference to this so multiple method calls can be chained together
Set the TCP keepAlive setting for connections created by this instance to keepAlive
.
Set the TCP keepAlive setting for connections created by this instance to keepAlive
.
a reference to this so multiple method calls can be chained together
If tcpNoDelay
is set to true
then Nagle's algorithm
will turned off for the TCP connections created by this instance.
If tcpNoDelay
is set to true
then Nagle's algorithm
will turned off for the TCP connections created by this instance.
a reference to this so multiple method calls can be chained together
Set the trafficClass setting for connections created by this instance to trafficClass
.
Set the trafficClass setting for connections created by this instance to trafficClass
.
a reference to this so multiple method calls can be chained together
If you want an SSL client to trust *all* server certificates rather than match them against those in its trust store, you can set this to true.
If you want an SSL client to trust *all* server certificates rather than match them against those in its trust store, you can set this to true.
Use this with caution as you may be exposed to "main in the middle" attacks
Set to true if you want to trust all server certificates
Set the password for the SSL trust store.
Set the password for the SSL trust store. This method should only be used in SSL mode, i.e. after
org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true
.
A reference to this, so multiple invocations can be chained together.
Set the path to the SSL trust store.
Set the path to the SSL trust store. This method should only be used in SSL mode, i.e. after
org.vertx.scala.core.SSLSupport.setSSL(boolean) has been set to true
.
The trust store is a standard Java Key Store, and should contain the certificates of any servers that the client trusts.
A reference to this, so multiple invocations can be chained together.
Set if the org.vertx.scala.core.http.HttpClient should try to use compression.
Set if vertx should use pooled buffers for performance reasons.
Set if vertx should use pooled buffers for performance reasons. Doing so will give the best throughput but may need a bit higher memory footprint.
a reference to this so multiple method calls can be chained together
If verifyHost
is true
, then the client will try to validate the remote server's certificate
hostname against the requested host.
If verifyHost
is true
, then the client will try to validate the remote server's certificate
hostname against the requested host. Should default to 'true'.
This method should only be used in SSL mode, i.e. after org.vertx.scala.core.http.HttpClient.setSSL(boolean) has been set to true
.
A reference to this, so multiple invocations can be chained together.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP TRACE request with the specified uri
.
This method returns an org.vertx.scala.core.http.HttpClientRequest instance which represents an HTTP TRACE request with the specified uri
.
When an HTTP response is received from the server the responseHandler
is called passing in the response.
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
An HTTP client that maintains a pool of connections to a specific host, at a specific port. The client supports pipelining of requests.
As well as HTTP requests, the client can act as a factory for
WebSocket websockets
.If an instance is instantiated from an event loop then the handlers of the instance will always be called on that same event loop. If an instance is instantiated from some other arbitrary Java thread (i.e. when running embedded) then and event loop will be assigned to the instance and used when any of its handlers are called.
Instances of HttpClient are thread-safe.