Replacement for deprecated DefaultHttpClient

前端 未结 6 1907
小鲜肉
小鲜肉 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:20

    It's Time to switch over to OkHttp which does HTTP efficiently and makes your stuff load faster and saves bandwidth.It supports both synchronous blocking calls and async calls with callbacks.

    OkHttp supports Android 2.3 and above.

    Add the below dependency to your android Project.

    compile 'com.squareup.okhttp:okhttp:2.4.0'
    

提交回复
热议问题