com.ning.http.client.AsyncHttpClientConfig.isFollowRedirect()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(618)

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

AsyncHttpClientConfig.isFollowRedirect介绍

[英]Is HTTP redirect enabled
[中]是否启用HTTP重定向

代码示例

代码示例来源:origin: com.ning/async-http-client

public static boolean followRedirect(AsyncHttpClientConfig config, Request request) {
  return request.getFollowRedirect() != null ? request.getFollowRedirect().booleanValue() : config.isFollowRedirect();
}

代码示例来源:origin: com.ning/async-http-client

private HttpTransactionContext(final GrizzlyAsyncHttpProvider provider,
    final Connection connection,
    final GrizzlyResponseFuture future, final Request ahcRequest) {
  this.provider = provider;
  this.connection = connection;
  this.future = future;
  this.ahcRequest = ahcRequest;
  this.proxyServer = ProxyUtils.getProxyServer(
      provider.getClientConfig(), ahcRequest);
  redirectsAllowed = provider.getClientConfig().isFollowRedirect();
  maxRedirectCount = provider.getClientConfig().getMaxRedirects();
  this.requestUri = ahcRequest.getUri();
}

代码示例来源:origin: com.ning/async-http-client

sslContext = prototype.getSSLContext();
userAgent = prototype.getUserAgent();
followRedirect = prototype.isFollowRedirect();
compressionEnforced = prototype.isCompressionEnforced();
applicationThreadPool = prototype.executorService();

代码示例来源:origin: io.gatling/async-http-client

public static boolean followRedirect(AsyncHttpClientConfig config, Request request) {
  return request.getFollowRedirect() != null ? request.getFollowRedirect().booleanValue() : config.isFollowRedirect();
}

代码示例来源:origin: javaee/grizzly-ahc

public static boolean followRedirect(AsyncHttpClientConfig config, Request request) {
  return request.getFollowRedirect() != null ? request.getFollowRedirect().booleanValue() : config.isFollowRedirect();
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

public static boolean followRedirect(AsyncHttpClientConfig config, Request request) {
  return request.getFollowRedirect() != null ? request.getFollowRedirect().booleanValue() : config.isFollowRedirect();
}

代码示例来源:origin: io.gatling/async-http-client

HttpTransactionContext(final GrizzlyAsyncHttpProvider provider,
            final GrizzlyResponseFuture future,
            final Request request,
            final AsyncHandler handler) {
  this.provider = provider;
  this.future = future;
  this.request = request;
  this.handler = handler;
  redirectsAllowed = provider.clientConfig.isFollowRedirect();
  maxRedirectCount = provider.clientConfig.getMaxRedirects();
  this.requestUri = request.getURI();
}

代码示例来源:origin: spotify/async-google-pubsub-client

log.debug("request compression level: {}", builder.compressionLevel);
log.debug("accept any certificate: {}", config.isAcceptAnyCertificate());
log.debug("follows redirect: {}", config.isFollowRedirect());
log.debug("pooled connection TTL: {}", config.getConnectionTTL());
log.debug("pooled connection idle timeout: {}", config.getPooledConnectionIdleTimeout());

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

private HttpTransactionContext(final GrizzlyAsyncHttpProvider provider,
    final Connection connection,
    final GrizzlyResponseFuture future, final Request ahcRequest) {
  this.provider = provider;
  this.connection = connection;
  this.future = future;
  this.ahcRequest = ahcRequest;
  this.proxyServer = ProxyUtils.getProxyServer(
      provider.getClientConfig(), ahcRequest);
  redirectsAllowed = provider.getClientConfig().isFollowRedirect();
  maxRedirectCount = provider.getClientConfig().getMaxRedirects();
  this.requestUri = ahcRequest.getUri();
}

代码示例来源:origin: javaee/grizzly-ahc

private HttpTransactionContext(final GrizzlyAsyncHttpProvider provider,
    final Connection connection,
    final GrizzlyResponseFuture future, final Request ahcRequest) {
  this.provider = provider;
  this.connection = connection;
  this.future = future;
  this.ahcRequest = ahcRequest;
  this.proxyServer = ProxyUtils.getProxyServer(
      provider.getClientConfig(), ahcRequest);
  redirectsAllowed = provider.getClientConfig().isFollowRedirect();
  maxRedirectCount = provider.getClientConfig().getMaxRedirects();
  this.requestUri = ahcRequest.getUri();
}

代码示例来源:origin: io.gatling/async-http-client

sslContext = prototype.getSSLContext();
userAgent = prototype.getUserAgent();
followRedirect = prototype.isFollowRedirect();
compressionEnabled = prototype.isCompressionEnabled();
applicationThreadPool = prototype.executorService();

代码示例来源:origin: javaee/grizzly-ahc

sslContext = prototype.getSSLContext();
userAgent = prototype.getUserAgent();
followRedirect = prototype.isFollowRedirect();
compressionEnforced = prototype.isCompressionEnforced();
applicationThreadPool = prototype.executorService();

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

sslContext = prototype.getSSLContext();
userAgent = prototype.getUserAgent();
followRedirect = prototype.isFollowRedirect();
compressionEnforced = prototype.isCompressionEnforced();
applicationThreadPool = prototype.executorService();

相关文章

微信公众号

最新文章

更多