vertx / io.vertx.reactivex.core.http / HttpClient

# HttpClient

`open class HttpClient : Measured`

An asynchronous HTTP client.

It allows you to make requests to HTTP servers, and a single client can make requests to any server.

It also allows you to open WebSockets to servers.

The client can also pool HTTP connections.

For pooling to occur, keep-alive must be true on the io.vertx.core.http.HttpClientOptions (default is true). In this case connections will be pooled and re-used if there are pending HTTP requests waiting to get a connection, otherwise they will be closed.

This gives the benefits of keep alive when the client is loaded but means we don't keep connections hanging around unnecessarily when there would be no benefits anyway.

The client also supports pipe-lining of requests. Pipe-lining means another request is sent on the same connection before the response from the preceding one has returned. Pipe-lining is not appropriate for all requests.

To enable pipe-lining, it must be enabled on the io.vertx.core.http.HttpClientOptions (default is false).

When pipe-lining is enabled the connection will be automatically closed when all in-flight responses have returned and there are no outstanding pending requests to write.

The client is designed to be reused between requests.

NOTE: This class has been automatically generated from the io.vertx.core.http.HttpClient non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `HttpClient(delegate: HttpClient)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<HttpClient>`

### Functions

close | `open fun close(): Unit` Close the client. Closing will close down any pooled connections. Clients should always be closed after use.
delete | `open fun delete(options: RequestOptions): HttpClientRequest` Create an HTTP DELETE request to send to the server with the specified options. `open fun delete(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP DELETE request to send to the server at the specified host and port. `open fun delete(host: String, requestURI: String): HttpClientRequest` Create an HTTP DELETE request to send to the server at the specified host and default port. `open fun delete(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP DELETE request to send to the server with the specified options, specifying a response handler to receive the response `open fun delete(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP DELETE request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun delete(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP DELETE request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun delete(requestURI: String): HttpClientRequest` Create an HTTP DELETE request to send to the server at the default host and port. `open fun delete(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP DELETE request to send to the server at the default host and port, specifying a response handler to receive the response
deleteAbs | `open fun deleteAbs(absoluteURI: String): HttpClientRequest` Create an HTTP DELETE request to send to the server using an absolute URI `open fun deleteAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response
equals | `open fun equals(other: Any?): Boolean`
get | `open fun get(options: RequestOptions): HttpClientRequest` Create an HTTP GET request to send to the server with the specified options. `open fun get(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP GET request to send to the server at the specified host and port. `open fun get(host: String, requestURI: String): HttpClientRequest` Create an HTTP GET request to send to the server at the specified host and default port. `open fun get(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP GET request to send to the server with the specified options, specifying a response handler to receive the response `open fun get(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP GET request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun get(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP GET request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun get(requestURI: String): HttpClientRequest` Create an HTTP GET request to send to the server at the default host and port. `open fun get(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP GET request to send to the server at the default host and port, specifying a response handler to receive the response
getAbs | `open fun getAbs(absoluteURI: String): HttpClientRequest` Create an HTTP GET request to send to the server using an absolute URI `open fun getAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response
getDelegate | `open fun getDelegate(): HttpClient`
getNow | `open fun getNow(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP GET request to the server with the specified options, specifying a response handler to receive the response `open fun getNow(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP GET request to the server at the specified host and port, specifying a response handler to receive the response `open fun getNow(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP GET request to the server at the specified host and default port, specifying a response handler to receive the response `open fun getNow(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP GET request to the server at the default host and port, specifying a response handler to receive the response
hashCode | `open fun hashCode(): Int`
head | `open fun head(options: RequestOptions): HttpClientRequest` Create an HTTP HEAD request to send to the server with the specified options. `open fun head(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP HEAD request to send to the server at the specified host and port. `open fun head(host: String, requestURI: String): HttpClientRequest` Create an HTTP HEAD request to send to the server at the specified host and default port. `open fun head(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP HEAD request to send to the server with the specified options, specifying a response handler to receive the response `open fun head(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP HEAD request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun head(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP HEAD request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun head(requestURI: String): HttpClientRequest` Create an HTTP HEAD request to send to the server at the default host and port. `open fun head(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP HEAD request to send to the server at the default host and port, specifying a response handler to receive the response
headAbs | `open fun headAbs(absoluteURI: String): HttpClientRequest` Create an HTTP HEAD request to send to the server using an absolute URI `open fun headAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response
headNow | `open fun headNow(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP HEAD request to the server with the specified options, specifying a response handler to receive the response `open fun headNow(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP HEAD request to the server at the specified host and port, specifying a response handler to receive the response `open fun headNow(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP HEAD request to the server at the specified host and default port, specifying a response handler to receive the response `open fun headNow(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP HEAD request to the server at the default host and port, specifying a response handler to receive the response
isMetricsEnabled | `open fun isMetricsEnabled(): Boolean` Whether the metrics are enabled for this measured object
newInstance | `open static fun newInstance(arg: HttpClient): HttpClient`
options | `open fun options(options: RequestOptions): HttpClientRequest` Create an HTTP OPTIONS request to send to the server with the specified options. `open fun options(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the specified host and port. `open fun options(host: String, requestURI: String): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the specified host and default port. `open fun options(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP OPTIONS request to send to the server with the specified options, specifying a response handler to receive the response `open fun options(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun options(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun options(requestURI: String): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the default host and port. `open fun options(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP OPTIONS request to send to the server at the default host and port, specifying a response handler to receive the response
optionsAbs | `open fun optionsAbs(absoluteURI: String): HttpClientRequest` Create an HTTP OPTIONS request to send to the server using an absolute URI `open fun optionsAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP OPTIONS request to send to the server using an absolute URI, specifying a response handler to receive the response
optionsNow | `open fun optionsNow(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP OPTIONS request to the server with the specified options, specifying a response handler to receive the response `open fun optionsNow(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP OPTIONS request to the server at the specified host and port, specifying a response handler to receive the response `open fun optionsNow(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP OPTIONS request to the server at the specified host and default port, specifying a response handler to receive the response `open fun optionsNow(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClient` Sends an HTTP OPTIONS request to the server at the default host and port, specifying a response handler to receive the response
post | `open fun post(options: RequestOptions): HttpClientRequest` Create an HTTP POST request to send to the server with the specified options. `open fun post(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP POST request to send to the server at the specified host and port. `open fun post(host: String, requestURI: String): HttpClientRequest` Create an HTTP POST request to send to the server at the specified host and default port. `open fun post(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP POST request to send to the server with the specified options, specifying a response handler to receive the response `open fun post(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun post(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun post(requestURI: String): HttpClientRequest` Create an HTTP POST request to send to the server at the default host and port. `open fun post(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive the response
postAbs | `open fun postAbs(absoluteURI: String): HttpClientRequest` Create an HTTP POST request to send to the server using an absolute URI `open fun postAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response
put | `open fun put(options: RequestOptions): HttpClientRequest` Create an HTTP PUT request to send to the server with the specified options. `open fun put(port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP PUT request to send to the server at the specified host and port. `open fun put(host: String, requestURI: String): HttpClientRequest` Create an HTTP PUT request to send to the server at the specified host and default port. `open fun put(options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP PUT request to send to the server with the specified options, specifying a response handler to receive the response `open fun put(port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun put(host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun put(requestURI: String): HttpClientRequest` Create an HTTP PUT request to send to the server at the default host and port. `open fun put(requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive the response
putAbs | `open fun putAbs(absoluteURI: String): HttpClientRequest` Create an HTTP PUT request to send to the server using an absolute URI `open fun putAbs(absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response
redirectHandler | `open fun redirectHandler(handler: Function<HttpClientResponse, Future<HttpClientRequest>>): HttpClient` Set a redirect handler for the http client. The redirect handler is called when a `3xx` response is received and the request is configured to follow redirects with `io.vertx.reactivex.core.http.HttpClientRequest#setFollowRedirects`. The redirect handler is passed the io.vertx.reactivex.core.http.HttpClientResponse, it can return an io.vertx.reactivex.core.http.HttpClientRequest or `null`. when null is returned, the original response is processed by the original request response handler when a new `Future` is returned, the client will send this new request The handler must return a `Future` unsent so the client can further configure it and send it.
request | `open fun request(method: HttpMethod, options: RequestOptions): HttpClientRequest` Create an HTTP request to send to the server with the specified options. `open fun request(method: HttpMethod, port: Int, host: String, requestURI: String): HttpClientRequest` Create an HTTP request to send to the server at the specified host and port. `open fun request(method: HttpMethod, host: String, requestURI: String): HttpClientRequest` Create an HTTP request to send to the server at the specified host and default port. `open fun request(method: HttpMethod, options: RequestOptions, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP request to send to the server with the specified options, specifying a response handler to receive `open fun request(method: HttpMethod, port: Int, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP request to send to the server at the specified host and port, specifying a response handler to receive the response `open fun request(method: HttpMethod, host: String, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive the response `open fun request(method: HttpMethod, requestURI: String): HttpClientRequest` Create an HTTP request to send to the server at the default host and port. `open fun request(method: HttpMethod, requestURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP request to send to the server at the default host and port, specifying a response handler to receive the response
requestAbs | `open fun requestAbs(method: HttpMethod, absoluteURI: String): HttpClientRequest` Create an HTTP request to send to the server using an absolute URI `open fun requestAbs(method: HttpMethod, absoluteURI: String, responseHandler: Handler<HttpClientResponse>): HttpClientRequest` Create an HTTP request to send to the server using an absolute URI, specifying a response handler to receive the response
toString | `open fun toString(): String`
websocket | `open fun websocket(options: RequestOptions, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(options: RequestOptions, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket with the specified options `open fun websocket(port: Int, host: String, requestURI: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(port: Int, host: String, requestURI: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified port, host and relative request URI `open fun websocket(host: String, requestURI: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(host: String, requestURI: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the host and relative request URI and default port `open fun websocket(options: RequestOptions, headers: MultiMap, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(options: RequestOptions, headers: MultiMap, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket with the specified options, and with the specified headers `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified port, host and relative request URI, and with the specified headers `open fun websocket(host: String, requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(host: String, requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified host,relative request UR, and default port and with the specified headers `open fun websocket(options: RequestOptions, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>): HttpClient` Connect a WebSocket with the specified optionsI, with the specified headers and using the specified version of WebSockets `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified port, host and relative request URI, with the specified headers and using the specified version of WebSockets `open fun websocket(options: RequestOptions, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket with the specified options, with the specified headers and using the specified version of WebSockets `open fun websocket(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified host, relative request URI and default port with the specified headers and using the specified version of WebSockets `open fun websocket(options: RequestOptions, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(options: RequestOptions, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket with the specified options, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified port, host and relative request URI, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols `open fun websocket(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket to the specified host, relative request URI and default port, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols `open fun websocket(requestURI: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(requestURI: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket at the relative request URI using the default host and port `open fun websocket(requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(requestURI: String, headers: MultiMap, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket at the relative request URI using the default host and port and the specified headers `open fun websocket(requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(requestURI: String, headers: MultiMap, version: WebsocketVersion, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket at the relative request URI using the default host and port, the specified headers and the specified version of WebSockets `open fun websocket(requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>): HttpClient` `open fun websocket(requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket at the relative request URI using the default host and port, the specified headers, the specified version of WebSockets and the specified sub protocols
websocketAbs | `open fun websocketAbs(url: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String, wsConnect: Handler<WebSocket>, failureHandler: Handler<Throwable>): HttpClient` Connect a WebSocket with the specified absolute url, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols.
websocketStream | `open fun websocketStream(options: RequestOptions): ReadStream<WebSocket>` Create a WebSocket stream with the specified options `open fun websocketStream(port: Int, host: String, requestURI: String): ReadStream<WebSocket>` Create a WebSocket stream to the specified port, host and relative request URI `open fun websocketStream(host: String, requestURI: String): ReadStream<WebSocket>` Create a WebSocket stream to the specified host, relative request URI and default port `open fun websocketStream(options: RequestOptions, headers: MultiMap): ReadStream<WebSocket>` Create a WebSocket stream with the specified options, and with the specified headers `open fun websocketStream(port: Int, host: String, requestURI: String, headers: MultiMap): ReadStream<WebSocket>` Create a WebSocket stream to the specified port, host and relative request URI, and with the specified headers `open fun websocketStream(host: String, requestURI: String, headers: MultiMap): ReadStream<WebSocket>` Create a WebSocket stream to the specified host, relative request URI and default port and with the specified headers `open fun websocketStream(options: RequestOptions, headers: MultiMap, version: WebsocketVersion): ReadStream<WebSocket>` Create a WebSocket stream with the specified options, with the specified headers and using the specified version of WebSockets `open fun websocketStream(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion): ReadStream<WebSocket>` Create a WebSocket stream to the specified port, host and relative request URI, with the specified headers and using the specified version of WebSockets `open fun websocketStream(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion): ReadStream<WebSocket>` Create a WebSocket stream with the specified options and with the specified headers and using the specified version of WebSockets `open fun websocketStream(options: RequestOptions, headers: MultiMap, version: WebsocketVersion, subProtocols: String): ReadStream<WebSocket>` `open fun websocketStream(port: Int, host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String): ReadStream<WebSocket>` Create a WebSocket stream to the specified port, host and relative request URI, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols `open fun websocketStream(host: String, requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String): ReadStream<WebSocket>` Create a WebSocket stream to the specified host, relative request URI and default port, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols `open fun websocketStream(requestURI: String): ReadStream<WebSocket>` `open fun websocketStream(requestURI: String, headers: MultiMap): ReadStream<WebSocket>` Create a WebSocket stream at the relative request URI using the default host and port and the specified headers `open fun websocketStream(requestURI: String, headers: MultiMap, version: WebsocketVersion): ReadStream<WebSocket>` Create a WebSocket stream at the relative request URI using the default host and port, the specified headers and the specified version of WebSockets `open fun websocketStream(requestURI: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String): ReadStream<WebSocket>` Create a WebSocket stream at the relative request URI using the default host and port, the specified headers, the specified version of WebSockets and the specified sub protocols
websocketStreamAbs | `open fun websocketStreamAbs(url: String, headers: MultiMap, version: WebsocketVersion, subProtocols: String): ReadStream<WebSocket>` Create a WebSocket stream with the specified absolute url, the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols.