-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Comments
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 will be provided by integration with OkHttp (which is in-place replace for DefaultHttpClient based on HttpURLConnection). Moving to right milestone |
Any progress on that ? I can't find a nice solution to the caching problem. |
Here is the base code for 2.0 look here: https://github.com/leonardoxh/AsyncOkHttpClient |
that's official ? I can't find where you've handling the http caching |
Official not yet, cache is built in OkHttp |
印象笔记无法提交笔记,原因如下: 本月帐户上传流量已经达到上限。 原消息详情: 为了防止邮件过多,接下来的360分钟内,你将不会收到报错回复。 升级到印象笔记高级帐户,可以发送的邮件数量将从50封提升到200封。
|
is there any update on this? |
@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. |
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.
The text was updated successfully, but these errors were encountered: