I'm trying to perform a post with play.api.libs.ws.WS but I can't figure out
how to set the params, my code:
Promise<Response> promise = WS.url(Play.application().configuration()
.getString("sms.service.url")).post();
.post takes (T body, play.api.http.Writeable wrt, play.api.http.ContentTypeOf ct)
but I don't understand how I should pass the params there.
The documentation only states:
Promise<WS.Response> result = WS.url("http://localhost:9001").post("content");
How do I set the content eg. param1=foo and param2=bar?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…