在play 2.6中,WSClient.url(url)的URL编码如下。https:/localhost:1234mypagerequest?id=exact%25123&startR=1。这里的%25是加在我的URL上的。
I am using javaWS in build.sbt
import play.libs.ws.*;
@Inject WSClient ws;
WSRequest wsReq = ws.url(getUrl());
当我使用play 2.5时,这不是问题,代码是WS.url(url).Can you please help in solving this.
谢谢你的帮助
试着把这个添加到你的配置中。
play.ws.ahc.disableUrlEncoding = true