public class AndroidHttp
Deprecated. Gingerbread is no longer supported by Google Play Services. Please use NetHttpTransport directly or switch to Cronet which is better supported.
Beta
Utilities for Android HTTP transport.
Static Methods
newCompatibleTransport() (deprecated)
public static HttpTransport newCompatibleTransport()
Returns a new thread-safe HTTP transport instance that is compatible with Android SDKs prior to Gingerbread.
Don't use this for Android applications that anyway require Gingerbread. Instead just call
new NetHttpTransport()
.
Prior to Gingerbread, the HttpURLConnection implementation was buggy, and the Apache HTTP Client was preferred. However, starting with Gingerbread, the HttpURLConnection implementation bugs were fixed, and is now better supported than the Apache HTTP Client. There is no guarantee that Apache HTTP transport will continue to work in future SDKs. Therefore, this method uses NetHttpTransport for Gingerbread or higher, and otherwise ApacheHttpTransport.
Type | Description |
HttpTransport |