Class RequestConfig
- java.lang.Object
-
- org.apache.hc.client5.http.config.RequestConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
@Contract(threading=IMMUTABLE) public class RequestConfig extends java.lang.Object implements java.lang.CloneableImmutable class encapsulating request configuration items.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description static RequestConfigDEFAULT
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestConfig()Intended for CDI compatibility
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected RequestConfigclone()static RequestConfig.Buildercopy(RequestConfig config)static RequestConfig.Buildercustom()org.apache.hc.core5.util.TimeValuegetConnectionKeepAlive()org.apache.hc.core5.util.TimeoutgetConnectionRequestTimeout()org.apache.hc.core5.util.TimeoutgetConnectTimeout()Deprecated.java.lang.StringgetCookieSpec()org.apache.hc.core5.http2.priority.PriorityValuegetH2Priority()Returns the HTTP/2+ priority preference for this request ornullif unset.intgetMaxRedirects()org.apache.hc.core5.http.HttpHostgetProxy()java.util.Collection<java.lang.String>getProxyPreferredAuthSchemes()org.apache.hc.core5.util.TimeoutgetResponseTimeout()java.util.Collection<java.lang.String>getTargetPreferredAuthSchemes()java.nio.file.PathgetUnixDomainSocket()booleanisAuthenticationEnabled()booleanisCircularRedirectsAllowed()booleanisContentCompressionEnabled()booleanisExpectContinueEnabled()booleanisHardCancellationEnabled()booleanisProtocolUpgradeEnabled()booleanisRedirectsEnabled()java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static final RequestConfig DEFAULT
-
-
Method Detail
-
isExpectContinueEnabled
public boolean isExpectContinueEnabled()
-
getProxy
public org.apache.hc.core5.http.HttpHost getProxy()
- See Also:
RequestConfig.Builder.setProxy(HttpHost)
-
getCookieSpec
public java.lang.String getCookieSpec()
-
isRedirectsEnabled
public boolean isRedirectsEnabled()
-
isCircularRedirectsAllowed
public boolean isCircularRedirectsAllowed()
-
getMaxRedirects
public int getMaxRedirects()
-
isAuthenticationEnabled
public boolean isAuthenticationEnabled()
-
getTargetPreferredAuthSchemes
public java.util.Collection<java.lang.String> getTargetPreferredAuthSchemes()
-
getProxyPreferredAuthSchemes
public java.util.Collection<java.lang.String> getProxyPreferredAuthSchemes()
-
getConnectionRequestTimeout
public org.apache.hc.core5.util.Timeout getConnectionRequestTimeout()
-
getConnectTimeout
@Deprecated public org.apache.hc.core5.util.Timeout getConnectTimeout()
Deprecated.
-
getResponseTimeout
public org.apache.hc.core5.util.Timeout getResponseTimeout()
-
getConnectionKeepAlive
public org.apache.hc.core5.util.TimeValue getConnectionKeepAlive()
-
isContentCompressionEnabled
public boolean isContentCompressionEnabled()
-
isHardCancellationEnabled
public boolean isHardCancellationEnabled()
-
isProtocolUpgradeEnabled
public boolean isProtocolUpgradeEnabled()
- See Also:
(boolean)
-
getUnixDomainSocket
public java.nio.file.Path getUnixDomainSocket()
-
getH2Priority
@Experimental public org.apache.hc.core5.http2.priority.PriorityValue getH2Priority()
Returns the HTTP/2+ priority preference for this request ornullif unset.- Since:
- 5.6
-
clone
protected RequestConfig clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
custom
public static RequestConfig.Builder custom()
-
copy
public static RequestConfig.Builder copy(RequestConfig config)
-
-