public class RestClientUtil
extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
encodeFilter(String filter)
Internally used to encode the filter parameter
|
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
|
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 static String encodeFilter(String filter)
filter - string value that needs to be encoded.