+ return httpRequestBase;
+ }
+
+ private static HttpResponse getPostAndPutResponse(HttpEntityEnclosingRequestBase requestBase,
+ Map<String, String> header, Map<String, String> param, HttpEntity entity,
+ CloseableHttpClient httpClient) throws CorrelationException {
+ try {
+ addHeaders(header, requestBase);
+ addParams(param, requestBase);
+ if (entity != null) {
+ requestBase.setEntity(entity);
+ }
+ return executeRequest(httpClient, requestBase);
+ } catch (Exception e) {
+ throw new CorrelationException("Failed to connect to server", e);
+ }
+ }
+
+ private static HttpResponse getGetAndDeleteResponse(HttpRequestBase requestBase,
+ Map<String, String> header, CloseableHttpClient httpClient) throws CorrelationException {
+ try {
+ addHeaders(header, requestBase);
+ return executeRequest(httpClient, requestBase);
+ } catch (Exception e) {
+ throw new CorrelationException("Failed to connect to server", e);
+ }