I am using DefaultHttpClient
in my current app.
I read this article which states that the DefaultHttpClient
is deprecated: http://develope
Ok I waited for a week and so and did all lots of researches. I think I have found the answer.
I strongly advise for beginners and even professional Android programmers to know the existence of very helpful library called Retrofit:
Extensive document is present at http://square.github.io/retrofit/
The Stack overflow also has samples for almost everything one need to do over a network to contact a remote REST service.
It is better to stop using HttpURLConnection and AsyncTask. Retrofit is way faster and supports all failure situations out of the box.