Generate a HTTP response using the passed continuation
Generate a HTTP response using the passed continuation
the type of the BodyWriter with a refined Finished
type
function which commits the response prelude and provides an appropriate BodyWriter
an asynchronous BodyWriter#Finished
object. This type enforces that the BodyWriter
has been successfully closed.
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 theWriter
sclose()
method which has the return typeFuture[Writer#Finished]
, ensuring that the writer is closed.