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.
A factory for Redirecting to other URLs.
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
text/plain
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.