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();
我在执行上面显示的代码时遇到了“Content-Length delimited message body的早期结束(期望:3233986;收到:0)”异常。如果设置StringEntity有任何错误。请帮助我,提前谢谢。