Play 2.6 => url编码问题

问题描述 投票:0回答:1

在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.

谢谢你的帮助

java playframework
1个回答
0
投票

试着把这个添加到你的配置中。

play.ws.ahc.disableUrlEncoding = true
© www.soinside.com 2019 - 2024. All rights reserved.