An abstraction that is responsible for encoding the response of a generic type.
An abstraction that is responsible for encoding the response of type A
.
An abstraction that is responsible for building HTTP responses.
An abstraction that is responsible for building HTTP responses.
the HTTP response status
the HTTP headers map
the HTTP cookies list
Convenience method for creating new EncodeResponse instances.
A factory for Redirecting to other URLs.
A service that converts an encoded object into HTTP response with status OK using an implicit EncodeResponse.
Converts EncodeAnyResponse into EncodeResponse.
Allows to pass raw strings to ResponseBuilder.
This package enables a reasonable approach of building HTTP responses using the ResponseBuilder abstraction. The
ResponseBuilder
provides an immutable way of building concrete Response instances by specifying their status, headers and cookies. There are plenty of predefined builders named by HTTP statuses, i.e.,Ok
,Created
,NotFound
. Thus, the typical use case of theResponseBuilder
abstraction involves usage of concrete builder instead of abstractResponseBuilder
itself.In addition to
plain/text
responses, theResponseBuilder
is able to build any response, whosecontent-type
is specified by an implicit type-class EncodeResponse instance. In fact, any typeA
may be passed to aRequestReader
if there is a correspondingEncodeRequest[A]
instance available in the scope.