Content-Length分隔邮件正文的过早结束(预期:3233986;收到:0)

时间:2016-11-11 09:58:31

标签: java rest httpentity

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有任何错误。请帮助我,提前谢谢。

0 个答案:

没有答案