Package com.persequor.extension.rest
Class DefaultAdditionalHttpConfig
java.lang.Object
com.persequor.extension.rest.RequestConfig
com.persequor.extension.rest.DefaultAdditionalHttpConfig
- All Implemented Interfaces:
AdditionalHttpClientConfig
,IRequestConfig
public final class DefaultAdditionalHttpConfig
extends RequestConfig
implements AdditionalHttpClientConfig
Additional configuration for Http client,
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
This indicates if HTTP client should throw exception if it encounters status code other than 2**void
setThrowExceptionOnRequestError
(boolean throwExceptionOnRequestError) Sets iof the client should throw exceptions when there is error status code in the responseMethods inherited from class com.persequor.extension.rest.RequestConfig
getConnectTimeout, getReadTimeout, setConnectTimeout, setReadTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.persequor.extension.rest.IRequestConfig
getConnectTimeout, getReadTimeout
-
Constructor Details
-
DefaultAdditionalHttpConfig
public DefaultAdditionalHttpConfig()
-
-
Method Details
-
isThrowExceptionOnRequestError
public boolean isThrowExceptionOnRequestError()Description copied from interface:AdditionalHttpClientConfig
This indicates if HTTP client should throw exception if it encounters status code other than 2**- Specified by:
isThrowExceptionOnRequestError
in interfaceAdditionalHttpClientConfig
- Returns:
- boolean if the client should throw an exception on error
-
setThrowExceptionOnRequestError
public void setThrowExceptionOnRequestError(boolean throwExceptionOnRequestError) Description copied from interface:AdditionalHttpClientConfig
Sets iof the client should throw exceptions when there is error status code in the response- Specified by:
setThrowExceptionOnRequestError
in interfaceAdditionalHttpClientConfig
- Parameters:
throwExceptionOnRequestError
- if the client should throw an exception on error
-