I am making a HTTP request to a cgi php server from android application to get json reponse.
My application is validating whether the Internet connection is available or not before making HTTP request. Upto this all things are working properly. The problem is I’m
getting force close sometimes because of sudden death of Internet connection after making HTTP request.
So my questions are
- How do I understand I got a response from server?
- Should I need to keep a timmer for the response?
here is my perfect running code for web requests handling
this code is for GET requests, if you want to hit url with POST request then simply change this line accordingly
with