【发布时间】:2021-02-18 17:58:52
【问题描述】:
在我的 Play 项目中,我想获取从 REST 服务获取的文件的消息摘要。
服务调用:
ws.url("deployment/data/idResource").withMethod("GET").stream
从回复 (WSResponse) 中,我提取了以下内容:
response.bodyAsBytes.toByteBuffer.array()
这给了我这个警告:
p.a.l.w.a.StandaloneAhcWSClient$ - blockingToByteString is a blocking and unsafe operation!
有没有办法避免这个警告。
正如最后提到的,我需要一个 Array[Byte] 用于消息摘要。
【问题讨论】:
标签: scala playframework ws-client