Suppose I set the arbitrarily complex Flow[HttpRequest, HttpResponse, Unit] .
I can already use the specified stream to handle incoming requests with
Http().bindAndHandle(flow, "0.0.0.0", 8080)
Now I would like to add a log using some existing directive, for example logRequestResult("my-service"){...} Is there a way to combine this directive with my stream? I think I'm looking for another directive, something like
def completeWithFlow(flow: Flow): Route
Is this even possible?
NB: logRequestResult is an example, my question relates to any Directive that may be useful.
Stefano bonetti
source share