i am establishing connection with the server and its working fine. But there are times when i try to get the response code (when server is throwing back 401, 403, 404) i am getting IO Exception. I am handling everything based on the response code. So when it throws IO exception on
http.getResponseCode()
i am not able to read the response code. Please suggest a solution for this.