本文整理了Java中org.eclipse.jetty.client.api.Request.followRedirects
方法的一些代码示例,展示了Request.followRedirects
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.followRedirects
方法的具体详情如下:
包路径:org.eclipse.jetty.client.api.Request
类名称:Request
方法名:followRedirects
暂无
代码示例来源:origin: jersey/jersey
private Request translateRequest(final ClientRequest clientRequest) {
final URI uri = clientRequest.getUri();
final Request request = client.newRequest(uri);
request.method(clientRequest.getMethod());
request.followRedirects(clientRequest.resolveProperty(ClientProperties.FOLLOW_REDIRECTS, true));
final Object readTimeout = clientRequest.getConfiguration().getProperties().get(ClientProperties.READ_TIMEOUT);
if (readTimeout != null && readTimeout instanceof Integer && (Integer) readTimeout > 0) {
request.timeout((Integer) readTimeout, TimeUnit.MILLISECONDS);
}
return request;
}
代码示例来源:origin: resteasy/Resteasy
configureTimeout(request);
if (request.getAttributes().get(FOLLOW_REDIRECTS) == Boolean.FALSE) {
request.followRedirects(false);
代码示例来源:origin: org.attribyte/attribyte-http
@Override
public ListenableFuture<org.attribyte.api.http.Response> asyncSend(org.attribyte.api.http.Request request, RequestOptions options) {
final SettableFuture<org.attribyte.api.http.Response> fut = SettableFuture.create();
final TimingListener listener = new TimingListener(fut, options.maxResponseBytes);
toJettyRequest(request)
.followRedirects(options.followRedirects)
.listener(listener)
.send(listener);
return fut;
}
代码示例来源:origin: org.apache.camel/camel-jetty9
request.followRedirects(supportRedirect).listener(listener).send(responseListener);
代码示例来源:origin: org.glassfish.jersey.connectors/jersey-jetty-connector
private Request translateRequest(final ClientRequest clientRequest) {
final URI uri = clientRequest.getUri();
final Request request = client.newRequest(uri);
request.method(clientRequest.getMethod());
request.followRedirects(clientRequest.resolveProperty(ClientProperties.FOLLOW_REDIRECTS, true));
final Object readTimeout = clientRequest.getConfiguration().getProperties().get(ClientProperties.READ_TIMEOUT);
if (readTimeout != null && readTimeout instanceof Integer && (Integer) readTimeout > 0) {
request.timeout((Integer) readTimeout, TimeUnit.MILLISECONDS);
}
return request;
}
代码示例来源:origin: org.eclipse.jetty/jetty-client
.idleTimeout(oldRequest.getIdleTimeout(), TimeUnit.MILLISECONDS)
.timeout(oldRequest.getTimeout(), TimeUnit.MILLISECONDS)
.followRedirects(oldRequest.isFollowRedirects());
for (HttpField field : oldRequest.getHeaders())
内容来源于网络,如有侵权,请联系作者删除!