org.apache.httpcomponents httpcore 4.4.10 compile org.apache.httpcomponents httpclient 4.5.6 compile org.apache.httpcomponents httpmime 4.5.6 org.apache.httpcomponents fluent-hc 4.5.6 String port = ConfigurationUtil.getUserConfigSingleValue("DataRelease", "Service", "Publish-Port"); String drUrl = "http://" + ip + ":" + port + "/datarelease/api/dr/meta/rowpermission"; try { HttpResponse httpResponse = Request.Post(drUrl) .bodyForm(Form.form().add("resApplyId", resApplyId).build()) .socketTimeout(3000) .connectTimeout(3000) .execute().returnResponse(); if (httpResponse.getStatusLine().getStatusCode() == 200) { return "1"; } else { return "-1"; } } catch (IOException e) { log.error(e.getMessage(), e); return "-1"; }