vertx / io.vertx.core.http

Package io.vertx.core.http

Types

CaseInsensitiveHeaders

class CaseInsensitiveHeaders : MultiMap

This multi-map implementation has case insensitive keys, and can be used to hold some HTTP headers prior to making an HTTP request.

HttpClientResponse

interface HttpClientResponse : ReadStream<Buffer>

Represents a client-side HTTP response.

Vert.x provides you with one of these via the handler that was provided when creating the io.vertx.core.http.HttpClientRequest or that was set on the io.vertx.core.http.HttpClientRequest instance.

It implements io.vertx.core.streams.ReadStream so it can be used with io.vertx.core.streams.Pump to pump data with flow control.

HttpConnection

interface HttpConnection

Represents an HTTP connection. HTTP/1.x connection provides an limited implementation, the following methods are implemented:

HttpHeaders

class HttpHeaders

Contains often used Header names.

It also contains a utility method to create optimized CharSequence which can be used as header name and value.

HttpServerFileUpload

interface HttpServerFileUpload : ReadStream<Buffer>

Represents an file upload from an HTML FORM.

HttpServerResponse

interface HttpServerResponse : WriteStream<Buffer>

Represents a server-side HTTP response.

An instance of this is created and associated to every instance of HttpServerRequest that.

It allows the developer to control the HTTP response that is sent back to the client for a particular HTTP request.

It contains methods that allow HTTP headers and trailers to be set, and for a body to be written out to the response.

It also allows files to be streamed by the kernel directly from disk to the outgoing HTTP connection, bypassing user space altogether (where supported by the underlying operating system). This is a very efficient way of serving files from the server since buffers do not have to be read one by one from the file and written to the outgoing socket.

It implements io.vertx.core.streams.WriteStream so it can be used with io.vertx.core.streams.Pump to pump data with flow control.

RequestOptions

open class RequestOptions

Options describing how an HttpClient will make connect to make a request.

ServerWebSocket

interface ServerWebSocket : WebSocketBase

Represents a server side WebSocket.

Instances of this class are passed into a io.vertx.core.http.HttpServer#websocketHandler or provided when a WebSocket handshake is manually HttpServerRequest#upgradeed.

WebSocket

interface WebSocket : WebSocketBase

Represents a client-side WebSocket.

WebsocketVersion

class WebsocketVersion

Represents the WebSocket version

Exceptions

ConnectionPoolTooBusyException

open class ConnectionPoolTooBusyException : VertxException

Represents a failure to add a HttpClientRequest to the wait queue on an ConnectionManager.

If an HttpClient receives a request but is already handling maxPoolSize requests it will attempt to put the new request on it's wait queue. If the maxWaitQueueSize is set and the new request would cause the wait queue to exceed that size then the request will receive this exception.

StreamResetException

open class StreamResetException : VertxException

This exception signals a stream reset, it is used only for HTTP/2.

WebsocketRejectedException

open class WebsocketRejectedException : VertxException