本文整理了Java中com.ning.http.client.AsyncHttpClientConfig.getMaxRedirects()
方法的一些代码示例,展示了AsyncHttpClientConfig.getMaxRedirects()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncHttpClientConfig.getMaxRedirects()
方法的具体详情如下:
包路径:com.ning.http.client.AsyncHttpClientConfig
类名称:AsyncHttpClientConfig
方法名:getMaxRedirects
[英]Get the maximum number of HTTP redirect
[中]获取HTTP重定向的最大数目
代码示例来源:origin: com.ning/async-http-client
public Protocol(ChannelManager channelManager, AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig nettyConfig,
NettyRequestSender requestSender) {
this.channelManager = channelManager;
this.config = config;
this.nettyConfig = nettyConfig;
this.requestSender = requestSender;
hasResponseFilters = !config.getResponseFilters().isEmpty();
hasIOExceptionFilters = !config.getIOExceptionFilters().isEmpty();
maxRedirectException = new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());
}
代码示例来源: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
if (currentRedirectCount++ < config.getMaxRedirects()) {
String location = urlConnection.getHeaderField("Location");
Uri redirUri = Uri.create(uri, location);
throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());
代码示例来源:origin: com.ning/async-http-client
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
proxyServerSelector = prototype.getProxyServerSelector();
代码示例来源: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: com.ning/async-http-client
if (future.incrementAndGetCurrentRedirectCount() >= config.getMaxRedirects()) {
throw maxRedirectException;
代码示例来源: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: 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: io.gatling/async-http-client
currentRedirectCount = config.getMaxRedirects();
if (currentRedirectCount++ < config.getMaxRedirects()) {
String location = method.getResponseHeader("Location").getValue();
UriComponents rediUri = UriComponents.create(uri, location);
throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());
代码示例来源:origin: io.gatling/async-http-client
if (currentRedirectCount++ < config.getMaxRedirects()) {
String location = urlConnection.getHeaderField("Location");
UriComponents redirUri = UriComponents.create(uri, location);
throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
proxyServerSelector = prototype.getProxyServerSelector();
代码示例来源:origin: io.gatling/async-http-client
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
proxyServerSelector = prototype.getProxyServerSelector();
代码示例来源:origin: javaee/grizzly-ahc
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
proxyServerSelector = prototype.getProxyServerSelector();
代码示例来源:origin: io.gatling/async-http-client
if (future.incrementAndGetCurrentRedirectCount() >= config.getMaxRedirects()) {
throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());
内容来源于网络,如有侵权,请联系作者删除!