Package com.helger.httpclient
Interface IHttpClientSettings
- All Known Implementing Classes:
HttpClientSettings
public interface IHttpClientSettings
Read-only interface for
HttpClientSettings- Since:
- 9.1.8
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.util.Timeoutorg.apache.hc.core5.util.Timeoutorg.apache.hc.core5.util.TimeoutintCreate a custom SSLContext to use for the SSL Socket factory.com.helger.http.tls.ITLSConfigurationModedefault booleandefault booleanbooleanbooleanbooleanbooleanboolean
-
Method Details
-
isUseDNSClientCache
boolean isUseDNSClientCache()- Returns:
trueif DNS client caching is enabled (default),falseif it is disabled.
-
getSSLContext
Create a custom SSLContext to use for the SSL Socket factory.- Returns:
nullif no custom context is present.
-
getHostnameVerifier
- Returns:
- The current hostname verifier to be used. Default to
null.
-
getTLSConfigurationMode
@Nullable com.helger.http.tls.ITLSConfigurationMode getTLSConfigurationMode()- Returns:
- The TLS configuration mode to be used.
nullmeans to use the default settings without specific cipher suites.
-
getGeneralProxy
- Returns:
- The general HTTP proxy settings to be used. These settings apply to any protocol,
except they are overridden in the more specific "http" and "https" proxy settings.
Never
null. - Since:
- 10.5.0
- See Also:
-
getHttpProxy
- Returns:
- The HTTP proxy settings to be used exclusively for the "http" protocol. Never
null. - Since:
- 10.5.0
- See Also:
-
getHttpsProxy
- Returns:
- The HTTP proxy settings to be used exclusively for the "https" protocol. Never
null. - Since:
- 10.5.0
- See Also:
-
getRetryCount
@Nonnegative int getRetryCount()- Returns:
- The number of retries. Defaults to none.
-
hasRetries
default boolean hasRetries()- Returns:
trueif retries are enabled,falseif not.
-
getRetryInterval
- Returns:
- The retry interval (the duration after which a retry is performed). Never
null.
-
isRetryAlways
boolean isRetryAlways()- Returns:
trueif retries should also be performed for non-idempotent requests.- Since:
- 9.7.1
-
getConnectionRequestTimeout
@Nonnull org.apache.hc.core5.util.Timeout getConnectionRequestTimeout()- Returns:
- The connection request timeout in milliseconds. A value of 0 means "indefinite". Never
null.
-
getConnectTimeout
@Nonnull org.apache.hc.core5.util.Timeout getConnectTimeout()- Returns:
- The connect timeout. Never
null.
-
getResponseTimeout
@Nonnull org.apache.hc.core5.util.Timeout getResponseTimeout()- Returns:
- The response/read/request/socket timeout. Never
null.
-
getUserAgent
- Returns:
- The user agent header to be send. May be
null. - Since:
- 9.1.9
-
hasUserAgent
default boolean hasUserAgent()- Returns:
trueif a user agent is defined,falseif not.- Since:
- 9.1.9
-
isFollowRedirects
boolean isFollowRedirects()- Returns:
trueif HTTP redirects (status codes 3xx) should be followed,falseif not.- Since:
- 9.1.9
-
isUseKeepAlive
boolean isUseKeepAlive()- Returns:
trueif the HTTP Connection "Keep-Alive" should be used,falseif not.- Since:
- 9.6.1
-
isProtocolUpgradeEnabled
boolean isProtocolUpgradeEnabled()- Returns:
trueif a protocol upgrade e.g. from http to https should be done automatically or not. Since Apache HttpClient 5.4 this became the default.- Since:
- 10.5.0
-