本文整理了Java中com.ning.http.client.AsyncHttpClientConfig.isStrict302Handling()
方法的一些代码示例,展示了AsyncHttpClientConfig.isStrict302Handling()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncHttpClientConfig.isStrict302Handling()
方法的具体详情如下:
包路径:com.ning.http.client.AsyncHttpClientConfig
类名称:AsyncHttpClientConfig
方法名:isStrict302Handling
[英]In the case of a POST/Redirect/Get scenario where the server uses a 302 for the redirect, should AHC respond to the redirect with a GET or whatever the original method was. Unless configured otherwise, for a 302, AHC, will use a GET for this case.
[中]在POST/Redirect/Get场景中,服务器使用302进行重定向,AHC是否应使用Get或任何原始方法响应重定向。除非另有配置,否则对于302,AHC,将使用GET来处理这种情况。
代码示例来源:origin: com.ning/async-http-client
private boolean sendAsGet(final HttpResponsePacket response,
final HttpTransactionContext ctx) {
final int statusCode = response.getStatus();
return !(statusCode < 302 || statusCode > 303) &&
!(statusCode == 302 && ctx.provider.getClientConfig().isStrict302Handling());
}
} // END RedirectHandler
代码示例来源:origin: com.ning/async-http-client
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
enabledProtocols = prototype.enabledProtocols;
enabledCipherSuites = prototype.enabledCipherSuites;
代码示例来源:origin: io.gatling/async-http-client
private boolean sendAsGet(final HttpResponsePacket response,
final HttpTransactionContext ctx) {
final int statusCode = response.getStatus();
return !(statusCode < 302 || statusCode > 303)
&& !(statusCode == 302
&& ctx.provider.clientConfig.isStrict302Handling());
}
代码示例来源:origin: com.ning/async-http-client
boolean switchToGet = !originalMethod.equals("GET") && (statusCode == 303 || (statusCode == 302 && !config.isStrict302Handling()));
boolean keepBody = statusCode == 307 || (statusCode == 302 && config.isStrict302Handling());
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
private boolean sendAsGet(final HttpResponsePacket response,
final HttpTransactionContext ctx) {
final int statusCode = response.getStatus();
return !(statusCode < 302 || statusCode > 303) &&
!(statusCode == 302 && ctx.provider.getClientConfig().isStrict302Handling());
}
} // END RedirectHandler
代码示例来源:origin: javaee/grizzly-ahc
private boolean sendAsGet(final HttpResponsePacket response,
final HttpTransactionContext ctx) {
final int statusCode = response.getStatus();
return !(statusCode < 302 || statusCode > 303) &&
!(statusCode == 302 && ctx.provider.getClientConfig().isStrict302Handling());
}
} // END RedirectHandler
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
enabledProtocols = prototype.enabledProtocols;
enabledCipherSuites = prototype.enabledCipherSuites;
代码示例来源:origin: io.gatling/async-http-client
removeQueryParamOnRedirect = prototype.isRemoveQueryParamOnRedirect();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
timeConverter = prototype.timeConverter;
acceptAnyCertificate = prototype.acceptAnyCertificate;
代码示例来源:origin: javaee/grizzly-ahc
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
enabledProtocols = prototype.enabledProtocols;
enabledCipherSuites = prototype.enabledCipherSuites;
代码示例来源:origin: io.gatling/async-http-client
if ((statusCode == FOUND.getCode() && !config.isStrict302Handling()) || statusCode == SEE_OTHER.getCode())
requestBuilder.setMethod("GET");
内容来源于网络,如有侵权,请联系作者删除!