【发布时间】:2014-01-12 00:19:06
【问题描述】:
我的程序应该调用 `https://somepath.com/terminallocation/?msisdn=number" ,但似乎 ? 之后的所有内容都被切断了。我花了最后 3 个小时在这上面,但尝试次数有限。如果有人能提供帮助,那就太好了。
public static play.libs.F.Promise<Result> locationControllerGET(
String number) {
String feedUrl = "https://somepath.com/terminallocation/?msisdn="
+ number;
Logger.debug(WS.url(feedUrl)
.setAuth("user", "password", com.ning.http.client.Realm.AuthScheme.BASIC).getUrl().toString());
final play.libs.F.Promise<Result> resultPromise = WS.url(feedUrl)
.setAuth("48509237274", "Y7A7HNM3EFF3LF", com.ning.http.client.Realm.AuthScheme.BASIC).get()
.map(new Function<WS.Response, Result>() {
return ok("");
});
return resultPromise;
}
记录器的控制台输出:
[debug] application - https://somepath.com/terminallocation/?msisdn=number
我还检查了Logger.debug.debuf(deedUrl),它是正确的。
【问题讨论】:
标签: java web-services playframework get playframework-2.2