akka HttpResponse read body as String scala

前端 未结 7 982
广开言路
广开言路 2020-12-28 13:27

So I have a function with this signature (akka.http.model.HttpResponse):

def apply(query: Seq[(String, String)], accept: String): HttpResponse
7条回答
  •  长发绾君心
    2020-12-28 14:25

    Unmarshaller.stringUnmarshaller(someHttpEntity)
    

    works like a charm, implicit materializer needed as well

提交回复
热议问题