我正在尝试执行 GET 请求并打印我返回的 JSON 响应。JSON 响应应如下所示。
{
"request_status": "Success",
"workflow_step": "End"
}
这是我的代码:
handle(GetStatus) { args: GetStatus.Args =>
val client: Service[http.Request, http.Response] =
Http.client.withTlsWithoutValidation.newService("idm-preprod-fe1.twitter.biz:80")
val request = http.Request(
http.Method.Get,
"/plugin/rest/groupmanagement/getStatus/Create Group Request for mygroup (1638800484991)")
request.host = "idm-preprod-fe1.twitter.biz"
Future.value(GetStatusResponse(Option(client(request).toString)))
}
现在,当我的客户端将请求发送到服务器时,我想打印 JSON,但我得到的格式是。有人可以指导我如何实现这一目标。
Promise@1589131174(state=Transforming(WaitQueue(size=1),Promise@1823443423(state=Transforming(WaitQueue(size=1),Promise@859399396(state=Transforming(WaitQueue(size=4),Promise@1441370332(state=Transforming(WaitQueue(size=2),Promise@1459834(state=Transforming(WaitQueue(size=2),Promise@156947070(state=Transforming(WaitQueue(size=1),Promise@1739595981(state=Transforming(WaitQueue(size=1),Promise@273198152(state=Transforming(WaitQueue(size=1),Promise@478329071(state=Transforming(WaitQueue(size=2),Promise@1175786031(state=Transforming(WaitQueue(size=1),Promise@1749285277(state=Transforming(WaitQueue(size=1),Promise@1733124454(state=Transforming(WaitQueue(size=1),Promise@1257379837(state=Transforming(WaitQueue(size=1),Promise@1192050340(state=Transforming(WaitQueue(size=1),Promise@1114225943(state=Transforming(WaitQueue(size=1),Promise@1417620904(state=Transforming(WaitQueue(size=1),Promise@1638767611(state=Interruptible(WaitQueue(size=2),<function1>))))))))))))))))))))))))))))))))))