vertx-lang-scala-docs_2.12 3.4.1 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package core
  Definition Classes
    scala
-  package cli
  Definition Classes
    core
-  package datagram
  Definition Classes
    core
-  package dns
  Definition Classes
    core
-  package eventbus
  Definition Classes
    core
-  package file
  Definition Classes
    core
-  package http
  Definition Classes
    core
- GoAway
- Http2Settings
- HttpClient
- HttpClientOptions
- HttpClientRequest
- HttpClientResponse
- HttpConnection
- HttpFrame
- HttpServer
- HttpServerFileUpload
- HttpServerOptions
- HttpServerRequest
- HttpServerResponse
- RequestOptions
- ServerWebSocket
- WebSocket
- WebSocketBase
- WebSocketFrame
-  package metrics
  Definition Classes
    core
-  package net
  Definition Classes
    core
-  package parsetools
  Definition Classes
    core
-  package shareddata
  Definition Classes
    core
-  package streams
  Definition Classes
    core

p

io.vertx.scala.core

# http 

#### package http

 
Ordering

1. Alphabetic

Visibility

1. Public
2. All

### Type Members

1.  class GoAway extends AnyRef

   A frame.

2.  class Http2Settings extends AnyRef

   HTTP2 settings, the settings is initialized with the default HTTP/2 values.

   HTTP2 settings, the settings is initialized with the default HTTP/2 values.

   The settings expose the parameters defined by the HTTP/2 specification, as well as extra settings for protocol extensions.

3.  class HttpClient extends Measured

   An asynchronous HTTP client.

   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 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 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.

4.  class HttpClientOptions extends ClientOptionsBase

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

5.  class HttpClientRequest extends WriteStream[Buffer] with ReadStream[HttpClientResponse]

   Represents a client-side HTTP request.

   Represents a client-side HTTP request.

   Instances are created by an io.vertx.scala.core.http.HttpClient instance, via one of the methods corresponding to the specific HTTP methods, or the generic request methods. On creation the request will not have been written to the wire.

   Once a request has been obtained, headers can be set on it, and data can be written to its body if required. Once you are ready to send the request, one of the io.vertx.scala.core.http.HttpClientRequest#end methods should be called.

   Nothing is actually sent until the request has been internally assigned an HTTP connection.

   The io.vertx.scala.core.http.HttpClient instance will return an instance of this class immediately, even if there are no HTTP connections available in the pool. Any requests sent before a connection is assigned will be queued internally and actually sent when an HTTP connection becomes available from the pool.

   The headers of the request are queued for writing either when the io.vertx.scala.core.http.HttpClientRequest#end method is called, or, when the first part of the body is written, whichever occurs first.

   This class supports both chunked and non-chunked HTTP.

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

   An example of using this class is as follows:

6.  class HttpClientResponse extends ReadStream[Buffer]

   Represents a client-side HTTP response.

   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.scala.core.http.HttpClientRequest or that was set on the io.vertx.scala.core.http.HttpClientRequest instance.

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

7.  class HttpConnection extends AnyRef

   Represents an HTTP connection.

   Represents an HTTP connection.

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

   - io.vertx.scala.core.http.HttpConnection#close
   - io.vertx.scala.core.http.HttpConnection#closeHandler
   - io.vertx.scala.core.http.HttpConnection#exceptionHandler
8.  class HttpFrame extends AnyRef

   An HTTP/2 frame.

9.  class HttpServer extends Measured

   An HTTP and WebSockets server.

   An HTTP and WebSockets server.

   You receive HTTP requests by providing a io.vertx.scala.core.http.HttpServer#requestHandler. As requests arrive on the server the handler will be called with the requests.

   You receive WebSockets by providing a io.vertx.scala.core.http.HttpServer#websocketHandler. As WebSocket connections arrive on the server, the WebSocket is passed to the handler.

10.  class HttpServerFileUpload extends ReadStream[Buffer]

    Represents an file upload from an HTML FORM.

11.  class HttpServerOptions extends NetServerOptions

    Represents options used by an io.vertx.scala.core.http.HttpServer instance

12.  class HttpServerRequest extends ReadStream[Buffer]

    Represents a server-side HTTP request.

    Represents a server-side HTTP request.

    Instances are created for each request and passed to the user via a handler.

    Each instance of this class is associated with a corresponding io.vertx.scala.core.http.HttpServerResponse instance via io.vertx.scala.core.http.HttpServerRequest#response. It implements io.vertx.scala.core.streams.ReadStream so it can be used with io.vertx.scala.core.streams.Pump to pump data with flow control.

13.  class HttpServerResponse extends WriteStream[Buffer]

    Represents a server-side HTTP response.

    Represents a server-side HTTP response.

    An instance of this is created and associated to every instance of io.vertx.scala.core.http.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.scala.core.streams.WriteStream so it can be used with io.vertx.scala.core.streams.Pump to pump data with flow control.

14.  class RequestOptions extends AnyRef

    Options describing how an io.vertx.scala.core.http.HttpClient will make connect to make a request.

15.  class ServerWebSocket extends WebSocketBase

    Represents a server side WebSocket.

    Represents a server side WebSocket.

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

16.  class WebSocket extends WebSocketBase

    Represents a client-side WebSocket.

17.  trait WebSocketBase extends ReadStream[Buffer] with WriteStream[Buffer]

    Base WebSocket implementation.

    Base WebSocket implementation.

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

18.  class WebSocketFrame extends AnyRef

    A WebSocket frame that represents either text or binary data.

    A WebSocket frame that represents either text or binary data.

    A WebSocket message is composed of one or more WebSocket frames.

    If there is a just a single frame in the message then a single text or binary frame should be created with final = true.

    If there are more than one frames in the message, then the first frame should be a text or binary frame with final = false, followed by one or more continuation frames. The last continuation frame should have final = true.

### Value Members

1.  object GoAway
2.  object Http2Settings
3.  object HttpClient
4.  object HttpClientOptions
5.  object HttpClientRequest
6.  object HttpClientResponse
7.  object HttpConnection
8.  object HttpFrame
9.  object HttpServer
10.  object HttpServerFileUpload
11.  object HttpServerOptions
12.  object HttpServerRequest
13.  object HttpServerResponse
14.  object RequestOptions
15.  object ServerWebSocket
16.  object WebSocket
17.  object WebSocketBase
18.  object WebSocketFrame

### Ungrouped