所以我有一个带有这个签名的函数(akka.http.model.HttpResponse):
def apply(query: Seq[(String, String)], accept: String): HttpResponse
我只是在测试中获得一个值,如下所示:
val resp = TagAPI(Seq.empty[(String, String)], api.acceptHeader)
我想在下面这样的测试中检查它的主体:
resp.entity.asString == "tags"
我的问题是如何获得字符串形式的响应体?
https://stackoverflow.com/questions/32315789
复制相似问题