在我的 Play 项目中,我想获取从 REST 服务获得的文件的消息摘要。
服务电话:
ws.url("deployment/data/idResource").withMethod("GET").stream
从 Response ( WSResponse
) 我提取身体,如:
response.bodyAsBytes.toByteBuffer.array()
这给了我这个警告:
p.a.l.w.a.StandaloneAhcWSClient$ - blockingToByteString is a blocking and unsafe operation!
有没有办法避免这个警告。
正如最后提到的,我需要一个Array[Byte]
消息摘要。