Allows configuring request options.
- Since:
- 0.12.0
-
Method Summary
Modifier and TypeMethodDescriptionsetAuthentication(Consumer<HttpAuthenticationConfigurer> authConfigCallback) Allows setting a callback to configure the authentication.setFollowsRedirect(boolean followsRedirect) Sets whether the client has to follow the redirect internally when corresponds.setProxyConfig(Consumer<ProxyConfigurer> proxyConfigCallback) Allows setting a callback to configure the proxy parameters.setResponseTimeout(int responseTimeout) Sets the response timeout, in milliseconds.setSendBodyAlways(boolean sendBodyAlways) Sets whether the client has to send the request body, even when the method has no body semantics (GET, DELETE, TRACE, OPTIONS and HEAD, see RFC 7231).
-
Method Details
-
setResponseTimeout
Sets the response timeout, in milliseconds.- Parameters:
responseTimeout- response timeout, in milliseconds.- Returns:
- this config.
-
setFollowsRedirect
Sets whether the client has to follow the redirect internally when corresponds.- Parameters:
followsRedirect- whether the client has to follow the redirect internally when corresponds.- Returns:
- this config.
-
setAuthentication
HttpRequestOptionsConfigurer setAuthentication(Consumer<HttpAuthenticationConfigurer> authConfigCallback) Allows setting a callback to configure the authentication.- Parameters:
authConfigCallback- a callback to configure theHttpAuthenticationConfigurer.- Returns:
- this config.
-
setProxyConfig
Allows setting a callback to configure the proxy parameters.- Parameters:
proxyConfigCallback- a callback to configure theProxyConfigurer.- Returns:
- this config.
-
setSendBodyAlways
Sets whether the client has to send the request body, even when the method has no body semantics (GET, DELETE, TRACE, OPTIONS and HEAD, see RFC 7231).- Parameters:
sendBodyAlways- whether the client has to send the request body.- Returns:
- this config.
-