-\r
- WebTarget webTarget = client.target(url);\r
- Response response = webTarget.request(MediaType.APPLICATION_JSON)\r
- .post(Entity.entity(content, MediaType.APPLICATION_JSON));\r
-\r
- return checkStatus(response);\r
+ HttpResponse httpResponse;\r
+ HashMap<String, String> headers = new HashMap<>();\r
+ headers.put("Accept", MediaType.APPLICATION_JSON);\r
+ headers.put("Content-Type", MediaType.APPLICATION_JSON);\r
+ try {\r
+ httpResponse = HttpsUtils.post(url, headers, new HashMap<>(), new StringEntity(content, "utf-8"));\r
+ } catch (Exception e) {\r
+ throw new CorrelationException("Failed to connect to DCAE.", e);\r
+ }\r
+ return checkStatus(httpResponse);\r