| Modifier and Type | Class and Description |
|---|---|
static class |
RequestConfig.Builder |
| Modifier and Type | Field and Description |
|---|---|
static RequestConfig |
DEFAULT |
| Modifier | Constructor and Description |
|---|---|
protected |
RequestConfig()
适用于CDI兼容性
|
| Modifier and Type | Method and Description |
|---|---|
protected RequestConfig |
clone() |
static RequestConfig.Builder |
copy(RequestConfig config) |
static RequestConfig.Builder |
custom() |
int |
getConnectionRequestTimeout()
返回从连接管理器请求连接时使用的超时(以毫秒为单位)。
|
int |
getConnectTimeout()
确定连接建立之前的以毫秒为单位的超时时间。
|
String |
getCookieSpec()
确定要用于HTTP状态管理的cookie规范的名称。
|
InetAddress |
getLocalAddress()
返回要用于请求执行的本地地址。
|
int |
getMaxRedirects()
返回要遵循的最大重定向数。
|
HttpHost |
getProxy()
返回用于请求执行的HTTP代理。
|
Collection<String> |
getProxyPreferredAuthSchemes()
在与代理主机进行身份验证时,确定支持的身份验证方案的优先顺序。
|
int |
getSocketTimeout()
定义套接字超时(
SO_TIMEOUT )(以毫秒为单位),这是等待数据的超时,或
SO_TIMEOUT ,两个连续的数据包之间的最大周期不活动)。
|
Collection<String> |
getTargetPreferredAuthSchemes()
确定与目标主机进行身份验证时支持的身份验证方案的优先顺序。
|
boolean |
isAuthenticationEnabled()
确定是否应自动处理身份验证。
|
boolean |
isCircularRedirectsAllowed()
确定是否允许循环重定向(重定向到同一位置)。
|
boolean |
isContentCompressionEnabled()
确定是否请求目标服务器压缩内容。
|
boolean |
isDecompressionEnabled()
已过时。
|
boolean |
isExpectContinueEnabled()
确定是否为实体封闭方法启用了“Expect:100-Continue”握手。
|
boolean |
isRedirectsEnabled()
确定是否应自动处理重定向。
|
boolean |
isRelativeRedirectsAllowed()
确定是否应拒绝相对重定向。
|
boolean |
isStaleConnectionCheckEnabled()
|
String |
toString() |
public static final RequestConfig DEFAULT
public boolean isExpectContinueEnabled()
使用“Expect:100-continue”握手功能可以显着提高需要目标服务器认证的实体封装请求(如POST和PUT)。
“Expect:100-continue”握手应谨慎使用,因为它可能会导致不支持HTTP / 1.1协议的HTTP服务器和代理问题。
默认值: false
public HttpHost getProxy()
默认值: null
public InetAddress getLocalAddress()
在具有多个网络接口的机器上,该参数可用于选择连接始发的网络接口。
默认值: null
@Deprecated public boolean isStaleConnectionCheckEnabled()
默认值: false自4.4
public String getCookieSpec()
默认值: null
public boolean isRedirectsEnabled()
默认值: true
public boolean isRelativeRedirectsAllowed()
默认值: true
public boolean isCircularRedirectsAllowed()
默认值: false
public int getMaxRedirects()
默认值: 50
public boolean isAuthenticationEnabled()
默认值: true
public Collection<String> getTargetPreferredAuthSchemes()
默认值: null
public Collection<String> getProxyPreferredAuthSchemes()
默认值: null
public int getConnectionRequestTimeout()
超时值为零被解释为无限超时。 负值解释为未定义(系统默认值)。
默认值: -1
public int getConnectTimeout()
超时值为零被解释为无限超时。 负值解释为未定义(系统默认值)。
默认值: -1
public int getSocketTimeout()
SO_TIMEOUT )(以毫秒为单位),这是等待数据的超时时间, SO_TIMEOUT ,两个连续数据包之间的最大周期不活动)。
超时值为零被解释为无限超时。 负值解释为未定义(系统默认值)。
默认值: -1
@Deprecated public boolean isDecompressionEnabled()
isContentCompressionEnabled()
默认值: true
public boolean isContentCompressionEnabled()
默认值: true
protected RequestConfig clone() throws CloneNotSupportedException
clone在类
Object
CloneNotSupportedException
public static RequestConfig.Builder custom()
public static RequestConfig.Builder copy(RequestConfig config)
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.