Replacement for deprecated DefaultHttpClient

前端 未结 6 1876
小鲜肉
小鲜肉 2020-12-30 06:55

I am using DefaultHttpClient in my current app.

I read this article which states that the DefaultHttpClient is deprecated: http://develope

6条回答
  •  礼貌的吻别
    2020-12-30 07:18

    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.

提交回复
热议问题