summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/http
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-10-23 17:35:01 +0100
committerNarayan Kamath <narayan@google.com>2014-10-23 17:43:05 +0100
commit823675fdbb7f974b8e2fa9fbb71774b32487582d (patch)
treeaef29875d73573ec8dbd1a1a451bda8d1fe4190e /core/java/android/net/http
parent2acb2b1076c709ca50f0808ea0644bf8db1a3061 (diff)
downloadframeworks_base-823675fdbb7f974b8e2fa9fbb71774b32487582d.zip
frameworks_base-823675fdbb7f974b8e2fa9fbb71774b32487582d.tar.gz
frameworks_base-823675fdbb7f974b8e2fa9fbb71774b32487582d.tar.bz2
Deprecate more apache-http.
bug: 18067888 Change-Id: I50511d53dfc9ae236dfb1646c55a5dd7fa15d7b2
Diffstat (limited to 'core/java/android/net/http')
-rw-r--r--core/java/android/net/http/AndroidHttpClient.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/net/http/AndroidHttpClient.java b/core/java/android/net/http/AndroidHttpClient.java
index 04f3974..a262076 100644
--- a/core/java/android/net/http/AndroidHttpClient.java
+++ b/core/java/android/net/http/AndroidHttpClient.java
@@ -74,7 +74,13 @@ import java.util.zip.GZIPOutputStream;
* To retain cookies, simply add a cookie store to the HttpContext:</p>
*
* <pre>context.setAttribute(ClientContext.COOKIE_STORE, cookieStore);</pre>
+ *
+ * @deprecated Please use {@link java.net.URLConnection} and friends instead.
+ * The Apache HTTP client is no longer maintained and may be removed in a future
+ * release. Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
+ * for further details.
*/
+@Deprecated
public final class AndroidHttpClient implements HttpClient {
// Gzip of data shorter than this probably won't be worthwhile
@@ -108,7 +114,13 @@ public final class AndroidHttpClient implements HttpClient {
* @param userAgent to report in your HTTP requests
* @param context to use for caching SSL sessions (may be null for no caching)
* @return AndroidHttpClient for you to use for all your requests.
+ *
+ * @deprecated Please use {@link java.net.URLConnection} and friends instead. See
+ * {@link android.net.SSLCertificateSocketFactory} for SSL cache support. If you'd
+ * like to set a custom useragent, please use {@link java.net.URLConnection#setRequestProperty(String, String)}
+ * with {@code field} set to {@code User-Agent}.
*/
+ @Deprecated
public static AndroidHttpClient newInstance(String userAgent, Context context) {
HttpParams params = new BasicHttpParams();
@@ -148,7 +160,13 @@ public final class AndroidHttpClient implements HttpClient {
* Create a new HttpClient with reasonable defaults (which you can update).
* @param userAgent to report in your HTTP requests.
* @return AndroidHttpClient for you to use for all your requests.
+ *
+ * @deprecated Please use {@link java.net.URLConnection} and friends instead. See
+ * {@link android.net.SSLCertificateSocketFactory} for SSL cache support. If you'd
+ * like to set a custom useragent, please use {@link java.net.URLConnection#setRequestProperty(String, String)}
+ * with {@code field} set to {@code User-Agent}.
*/
+ @Deprecated
public static AndroidHttpClient newInstance(String userAgent) {
return newInstance(userAgent, null /* session cache */);
}