Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible switch from Apache Http Client to HttpUrlConnection #75

Closed
aaboyd opened this issue Jul 24, 2012 · 8 comments
Closed

Possible switch from Apache Http Client to HttpUrlConnection #75

aaboyd opened this issue Jul 24, 2012 · 8 comments

Comments

@aaboyd
Copy link

aaboyd commented Jul 24, 2012

Has this ever been discussed ?

Android seems to be "deprecating" ( not really deprecating, but couldn't find a better word ) apache http client in favor of HttpUrlConnection. See the following quote from the android developers blog ( http://android-developers.blogspot.com/2011/09/androids-http-clients.html ):

"Which client is best?
Apache HTTP client has fewer bugs on Eclair and Froyo. It is the best choice for these releases.

For Gingerbread and better, HttpURLConnection is the best choice. Its simple API and small size makes it great fit for Android. Transparent compression and response caching reduce network use, improve speed and save battery. New applications should use HttpURLConnection; it is where we will be spending our energy going forward."

This is obviously a huge amount of work, but if it provides speed improvements as well as battery life, is it worth it?"

Didn't know where else to post this, sorry for cluttering up the issues.

@twaddington
Copy link

HttpURLConnection doesn't give you much at this point. It really just enables gzip accept headers by default and supports a client-side cache. However, in the future it seems as if the Android team will be investing their resources in HttpURLConnection at which point it may become more appealing. In the meantime, the Apache DefaultHttpClient is still quite good.

This was referenced Oct 13, 2013
@ghost ghost assigned smarek Oct 14, 2013
@smarek
Copy link
Member

smarek commented Oct 29, 2013

This will be provided by integration with OkHttp (which is in-place replace for DefaultHttpClient based on HttpURLConnection). Moving to right milestone

@tagrudev
Copy link

Any progress on that ? I can't find a nice solution to the caching problem.

@leonardoxh
Copy link

@tagrudev

Here is the base code for 2.0 look here: https://github.com/leonardoxh/AsyncOkHttpClient

@tagrudev
Copy link

that's official ? I can't find where you've handling the http caching

@leonardoxh
Copy link

Official not yet, cache is built in OkHttp

@fineswap fineswap reopened this Apr 29, 2014
@gongzunpan
Copy link

印象笔记无法提交笔记,原因如下:

本月帐户上传流量已经达到上限。

原消息详情:
来自:Noor Dawod <notifications@github.com>
发送到:gongzunpan.e099425@m.yinxiang.com
全部收件人:loopj/android-async-http <android-async-http@noreply.github.com>
主题:Re: [android-async-http] Possible switch from Apache Http Client to HttpUrlConnection (#75)

为了防止邮件过多,接下来的360分钟内,你将不会收到报错回复。

升级到印象笔记高级帐户,可以发送的邮件数量将从50封提升到200封。
https://app.yinxiang.com/Checkout.action?origin=email%2Dcommerce

  • 印象笔记团队

@smarek smarek removed the wontfix label Jun 10, 2014
@pratikpradhan
Copy link

is there any update on this?
when are we getting caching enabled?

@smarek
Copy link
Member

smarek commented Aug 9, 2014

@pratikpradhan you're not getting anything, OkHttp integration won't happen, we're discarding the 2.0 branch in favor of HttpClient 4.3.3 version officially released and repackaged for Android.

If you want to use HttpURLConnection, you shall use another library, such as Volley (https://developer.android.com/training/volley/index.html) or Retrofit (https://github.com/square/retrofit)

If you need just caching, use proper backends with implemented ETag/If-Modified-Since features.

@smarek smarek closed this as completed Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants