HttpWithEntity requestEntity = new HttpWithEntity(endPointUrl);
requestEntity.addHeader("Cookie", "session_id=" + session.getSessionId());
requestEntity.setMethod("PUT");
StringEntity rse = new StringEntity("{}");
rse.setContentType("application/json; charset=UTF-8");
requestEntity.setEntity(rse);
CloseableHttpResponse closeableResponse = closableHttpClient.execute();
I have got "Premature end of Content-Length delimited message body (expected: 3233986; received: 0)" exception while executing my code shown above. If there any mistake on setting StringEntity. Please help me, thanks in advance.