org.eclipse.jetty.client.api.Request.followRedirects()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.eclipse.jetty.client.api.Request.followRedirects方法的一些代码示例,展示了Request.followRedirects的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.followRedirects方法的具体详情如下:
包路径:org.eclipse.jetty.client.api.Request
类名称:Request
方法名:followRedirects

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())

相关文章