Representation of a HTTP message body
Representation of a HTTP message body
The release of resources must be idempotent, meaning that discard()
may
be called after complete consumption of the body and it may also be called
numerous times.
Output pipe for writing http responses
Output pipe for writing http responses
This is, more or less, an asynchronous OutputStream
Helper functions for the client
HTTP response received by the client
HTTP response received by the client
Response code
Response message. This have no meaning for the HTTP connection, its just for human enjoyment.
Response headers
BodyReader used to consume the response body.
Provider of HTTP sessions
Provider of HTTP sessions
Implementations of this interface are responsible for providing a HTTP session on demand, ready to immediately perform a client request dispatch.
It is required that the methods on implementations of this interface be thread safe.
Generic interface for making HTTP client requests
Generic interface for making HTTP client requests
A HttpClient hides the details of the underlying sockets, connection pools etc. For a representation of a concrete session implementation see HttpClientSession.
Configuration object for creating a HttpClient
Configuration object for creating a HttpClient
maximum permissible length of the initial response line
maximum combined length of the headers
whether to be lenient in HTTP/1.x parsing
the AsynchronousChannelGroup
used to multiplex connections on
SSLContext
to use for secure connections
Representation of a concrete HTTP session
Representation of a concrete HTTP session
The HttpClientSession represents a true HTTP client session, either HTTP/1.x or HTTP/2.
Standard HTTP request
Standard HTTP request
HTTP request method
request url
request headers
function which returns the next chunk of the request body. Termination is
signaled by an empty ByteBuffer
as determined by ByteBuffer.hasRemaining()
.
The prelude of a standard HTTP response
The prelude of a standard HTTP response
Response status code
Response message. This has no meaning for the protocol, its purely for human enjoyment.
Response headers.
General configuration options for http servers
General configuration options for http servers
TODO: what about things like listening address and port?
The basic type that represents a HTTP service
The basic type that represents a HTTP service
val service: HttpService = { req => Future.success(RouteAction.Ok("Hello, world!")) }
When the Future
returned by the RouteAction
resolves, server
implementations are free to forcibly close the request body.
Response generator for HTTP servers
Response generator for HTTP servers
The route action can be thought of as a more complex version of the lambda
(HttpResponsePrelude => Writer) => Future[Writer#Finished]
with the key difference being the addition of the type parameter that makes
the type of the generic, or more importantly, the Writer#Finished
type
member generic. By doing so, the only way to satisfy the return value is to
call the Writer
s close()
method which has the return type
Future[Writer#Finished]
, ensuring that the writer is closed.
Incomplete collection of header names, all lower case for easy compatibility with HTTP/2.