- protected HttpResponse deploy(CorrelationDeployRule4Engine correlationDeployRule4Engine, String ip) throws Exception {\r
- String content = GsonUtil.beanToJson(correlationDeployRule4Engine);\r
- HashMap headers = createHeaders();\r
- String url = PREFIX + ip + PORT + RuleMgtConstant.ENGINE_PATH;\r
- CloseableHttpClient httpClient = null;\r
- try {\r
- httpClient = HttpsUtils.getHttpClient(HttpsUtils.DEFUALT_TIMEOUT);\r
- return HttpsUtils.put(url, headers, new HashMap<>(), new StringEntity(content),httpClient);\r
- } finally {\r
- closeHttpClient(httpClient);\r
- }\r
+ protected String deploy(CorrelationDeployRule4Engine correlationDeployRule4Engine, String ip) {\r
+ return JerseyClient.newInstance()\r
+ .header("Accept", MediaType.APPLICATION_JSON)\r
+ .put(getUrl(ip), Entity.json(correlationDeployRule4Engine));\r