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 promise = WS.url(Play.
WS.url(url)
.setContentType("application/x-www-form-urlencoded")
.post("param1=foo¶m2=bar");
This method uses an HTTP POST method to send its form request. As seen from the official documentation of Play, you should had already known of the GET method.
这种方式是使用post方式提交表单请求,见于play的官方文档,get方式的你应该已经知道了。