java.io.IOException: Attempted read from closed stream
I am making a HTTPPost call using Apache HTTP Client and then I am trying to create an object from the response using Jackson. Here is my code: private static final Logger log = Logger.getLogger(ReportingAPICall.class); ObjectMapper mapper = new ObjectMapper(); public void makePublisherApiCall(String jsonRequest) { String url = ReaderUtility.readPropertyFile().getProperty("hosturl"); DefaultHttpClient client = new DefaultHttpClient(); try { HttpPost postRequest = new HttpPost(url); StringEntity entity = new StringEntity(jsonRequest); postRequest.addHeader("content-type", "application/json");