public class RestClientUtil
extends Object
| Constructor and Description |
|---|
RestClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static HttpComponentsClientHttpRequestFactory |
getClientHttpRequestFactory(RestClientConfig clientConfig,
boolean isTokenService)
Method to prepare Httpclient with timeouts setting, proxy setting
|
static HttpEntity<String> |
getHttpEntity(HttpHeaders headers)
Returns HttpEntity created using the provided headers to invoke an API end-point
|
static HttpEntity<Object> |
getHttpEntity(Object param,
HttpHeaders headers)
Returns HttpEntity created using the provided headers and parameters to invoke an API end-point
|
HttpComponentsClientHttpRequestFactory |
wrapperNonStaticGetClientHttpRequestFactory(RestClientConfig clientConfig)
Internally used to prepare Httpclient with timeouts setting, proxy setting
|
HttpEntity<String> |
wrapperNonStaticgetHttpEntity(HttpHeaders headers)
Internally used to create HttpEntity using the provided headers to invoke an API end-point
|
HttpEntity<Object> |
wrapperNonStaticgetHttpEntity(Object param,
HttpHeaders headers)
Internally used to create HttpEntity using the provided headers and parameters to invoke an API end-point
|
public static HttpComponentsClientHttpRequestFactory getClientHttpRequestFactory(RestClientConfig clientConfig, boolean isTokenService)
clientConfig - HTTP Client config object used by the user to set the configisTokenService - boolean value to disable addition of headers while fetching tokenpublic static HttpEntity<String> getHttpEntity(HttpHeaders headers)
headers - HttpHeaders to be used to form the HttpEntitypublic static HttpEntity<Object> getHttpEntity(Object param,
HttpHeaders headers)
param - Object representing the paramheaders - HttpHeaders to be used to form the HttpEntitypublic HttpComponentsClientHttpRequestFactory wrapperNonStaticGetClientHttpRequestFactory(RestClientConfig clientConfig)
clientConfig - HTTP Client config object used by the user to set the configpublic HttpEntity<Object> wrapperNonStaticgetHttpEntity(Object param,
HttpHeaders headers)
param - Object representing the paramheaders - HttpHeaders to be used to form the HttpEntitypublic HttpEntity<String> wrapperNonStaticgetHttpEntity(HttpHeaders headers)
headers - HttpHeaders to be used to form the HttpEntity