0

I have the following code, which in general works without problems:

HttpPost post = new HttpPost(sendURL);
StringEntity se = new StringEntity( postJSON.toString(), "UTF-8");  
se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
post.setEntity(se);
response = httpClient.execute(post);

When postJSON has the following, I get an IllegalStateException, with the message "Manager is shut down":

{"action":"add","items":["61515"],"screen":"display","customer_number":"200001013"}

I got a similar message when the items array had malformed content, but I don't see the problem here. Also, the response is immediate, so I am pretty sure that the HTTP library is throwing the exception, not the server. What is wrong with this JSON object?

Furthermore, testing the JSON at JSONLint shows me that the JSON parses correctly, including the array with "61515", which is the new element in the code.

Aharon Manne
  • 712
  • 3
  • 11
  • 34

0 Answers0