Added in API level 1

android.net.http

Interfaces

BidirectionalStream.Callback Callback interface used to receive callbacks from a BidirectionalStream
UrlRequest.Callback Users of the HTTP stack extend this class to receive callbacks indicating the progress of a UrlRequest being processed. 
UrlRequest.StatusListener Listener interface used with UrlRequest.getStatus(StatusListener) to receive the status of a UrlRequest

Classes

BidirectionalStream Class for bidirectional sending and receiving of data over HTTP/2 or QUIC connections. 
BidirectionalStream.Builder Builder for BidirectionalStreams. 
ConnectionMigrationOptions A class configuring the HTTP connection migration functionality. 
ConnectionMigrationOptions.Builder Builder for ConnectionMigrationOptions
DnsOptions A class configuring the host resolution functionality. 
DnsOptions.Builder Builder for DnsOptions
DnsOptions.StaleDnsOptions A class configuring the stale DNS functionality. 
DnsOptions.StaleDnsOptions.Builder Builder for StaleDnsOptions
HeaderBlock Unmodifiable container of headers or trailers. 
HttpEngine An engine to process UrlRequests, which uses the best HTTP stack available on the current platform. 
HttpEngine.Builder A builder for HttpEngines, which allows runtime configuration of HttpEngine
HttpResponseCache Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and bandwidth. 
QuicOptions Configuration options for QUIC. 
QuicOptions.Builder Builder for QuicOptions
SslCertificate SSL certificate info (certificate details) class 
SslCertificate.DName A distinguished name helper class: a 3-tuple of:
  • the most specific common name (CN)
  • the most specific organization (O)
  • the most specific organizational unit (OU)
    •  
SslError This class represents a set of one or more SSL errors and the associated SSL certificate. 
UploadDataProvider Abstract class allowing the embedder to provide an upload body to UrlRequest
UploadDataSink Defines callbacks methods for UploadDataProvider
UrlRequest Controls an HTTP request (GET, PUT, POST etc). 
UrlRequest.Builder Builder for UrlRequests. 
UrlRequest.Status Request status values returned by UrlRequest.getStatus(StatusListener)
UrlResponseInfo Basic information about a response. 
X509TrustManagerExtensions X509TrustManager wrapper exposing Android-added features. 

Exceptions

CallbackException Exception passed to UrlRequest.Callback.onFailed() when UrlRequest.Callback or UploadDataProvider method throws an exception. 
HttpException Base exception passed to UrlRequest.Callback.onFailed()
InlineExecutionProhibitedException Thrown when an executor runs a submitted runnable inline in Executor.execute(Runnable) and UrlRequest.Builder.setDirectExecutorAllowed(boolean) was not called. 
NetworkException Exception passed to UrlRequest.Callback.onFailed() when the HTTP stack fails to process a network request. 
QuicException Subclass of NetworkException which contains a detailed QUIC error code from QuicErrorCode