So I have a function with this signature (akka.http.model.HttpResponse):
def apply(query: Seq[(String, String)], accept: String): HttpResponse
Here is simple directive that extracts string from request's body
string
def withString(): Directive1[String] = { extractStrictEntity(3.seconds).flatMap { entity => provide(entity.data.utf8String) } }