Package

org.http4s.blaze

http

Permalink

package http

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait BodyReader extends AnyRef

    Permalink

    Representation of a HTTP message body

    Representation of a HTTP message body

    Note

    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.

  2. trait BodyWriter extends AnyRef

    Permalink

    Output pipe for writing http responses

    Output pipe for writing http responses

    This is, more or less, an asynchronous OutputStream

  3. trait ClientActions extends AnyRef

    Permalink

    Helper functions for the client

  4. case class ClientResponse(code: Int, status: String, headers: Headers, body: BodyReader) extends Product with Serializable

    Permalink

    HTTP response received by the client

    HTTP response received by the client

    code

    Response code

    status

    Response message. This have no meaning for the HTTP connection, its just for human enjoyment.

    headers

    Response headers

    body

    BodyReader used to consume the response body.

  5. trait ClientSessionManager extends AnyRef

    Permalink

    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.

    Note

    It is required that the methods on implementations of this interface be thread safe.

  6. type Headers = Seq[(String, String)]

    Permalink
  7. trait Http1ClientSession extends HttpClientSession

    Permalink
  8. trait Http2ClientSession extends HttpClientSession

    Permalink
  9. trait HttpClient extends ClientActions

    Permalink

    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.

  10. case class HttpClientConfig(maxResponseLineLength: Int = 2 * 1048, maxHeadersLength: Int = 8 * 1024, lenientParser: Boolean = false, channelGroup: Option[AsynchronousChannelGroup] = None, sslContext: Option[SSLContext] = None) extends Product with Serializable

    Permalink

    Configuration object for creating a HttpClient

    Configuration object for creating a HttpClient

    maxResponseLineLength

    maximum permissible length of the initial response line

    maxHeadersLength

    maximum combined length of the headers

    lenientParser

    whether to be lenient in HTTP/1.x parsing

    channelGroup

    the AsynchronousChannelGroup used to multiplex connections on

    sslContext

    SSLContext to use for secure connections

  11. sealed trait HttpClientSession extends AnyRef

    Permalink

    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.

  12. case class HttpRequest(method: Method, url: Url, majorVersion: Int, minorVersion: Int, headers: Headers, body: BodyReader) extends Product with Serializable

    Permalink

    Standard HTTP request

    Standard HTTP request

    method

    HTTP request method

    url

    request url

    headers

    request headers

    body

    function which returns the next chunk of the request body. Termination is signaled by an empty ByteBuffer as determined by ByteBuffer.hasRemaining().

  13. case class HttpResponsePrelude(code: Int, status: String, headers: Headers) extends Product with Serializable

    Permalink

    The prelude of a standard HTTP response

    The prelude of a standard HTTP response

    code

    Response status code

    status

    Response message. This has no meaning for the protocol, its purely for human enjoyment.

    headers

    Response headers.

  14. case class HttpServerStageConfig(maxNonBodyBytes: Int = 16 * 1024, requestPreludeTimeout: Duration = Duration.Inf, serviceTimeout: Duration = Duration.Inf, maxConcurrentStreams: Int = 100, serviceExecutor: ExecutionContext = Execution.trampoline) extends Product with Serializable

    Permalink

    General configuration options for http servers

    General configuration options for http servers

    TODO: what about things like listening address and port?

  15. type HttpService = (HttpRequest) ⇒ Future[RouteAction]

    Permalink

    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!"))
    }
    Note

    When the Future returned by the RouteAction resolves, server implementations are free to forcibly close the request body.

  16. type Method = String

    Permalink
  17. trait RouteAction extends AnyRef

    Permalink

    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 Writers close() method which has the return type Future[Writer#Finished], ensuring that the writer is closed.

  18. type Url = String

    Permalink

Value Members

  1. object BodyReader

    Permalink
  2. object ClientResponse extends Serializable

    Permalink
  3. object HeaderNames

    Permalink

    Incomplete collection of header names, all lower case for easy compatibility with HTTP/2.

  4. object HttpClient

    Permalink
  5. object HttpClientConfig extends Serializable

    Permalink
  6. object HttpClientSession

    Permalink
  7. object RouteAction

    Permalink
  8. package http1

    Permalink
  9. package http2

    Permalink
  10. package parser

    Permalink
  11. package util

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped