【发布时间】:2014-02-25 04:31:43
【问题描述】:
我目前正在尝试获取可能位于多个重定向之后的资源。我的代码如下所示:
Client client = new Client(new Context(), Protocol.HTTP);
Context ctx = client.getContext();
ctx.getParameters().add("followRedirects", "true");
ClientResource cr = new ClientResource(ctx,u);
Representation r = cr.get();
但是不遵循重定向。我做错了什么?
这是 Google App Engine 上的 Restlet 2.1
【问题讨论】:
标签: java google-app-engine restlet http-redirect