Stay organized with collections
Save and categorize content based on your preferences.
android.net.http
Interfaces
Classes
Exceptions
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# android.net.http\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/http/package-summary \"View this page in Java\")\n\nInterfaces\n----------\n\n|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Callback](/reference/kotlin/android/net/http/BidirectionalStream.Callback) | Callback interface used to receive callbacks from a [BidirectionalStream](/reference/kotlin/android/net/http/BidirectionalStream). |\n| [Callback](/reference/kotlin/android/net/http/UrlRequest.Callback) | Users of the HTTP stack extend this class to receive callbacks indicating the progress of a [UrlRequest](/reference/kotlin/android/net/http/UrlRequest) being processed. |\n| [StatusListener](/reference/kotlin/android/net/http/UrlRequest.StatusListener) | Listener interface used with [getStatus](/reference/kotlin/android/net/http/UrlRequest#getStatus(android.net.http.UrlRequest.StatusListener)) to receive the status of a [UrlRequest](/reference/kotlin/android/net/http/UrlRequest). |\n\nClasses\n-------\n\n|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BidirectionalStream](/reference/kotlin/android/net/http/BidirectionalStream) | Class for bidirectional sending and receiving of data over HTTP/2 or QUIC connections. |\n| [ConnectionMigrationOptions](/reference/kotlin/android/net/http/ConnectionMigrationOptions) | A class configuring the HTTP connection migration functionality. |\n| [DnsOptions](/reference/kotlin/android/net/http/DnsOptions) | A class configuring the host resolution functionality. |\n| [HeaderBlock](/reference/kotlin/android/net/http/HeaderBlock) | Unmodifiable container of headers or trailers. |\n| [HttpEngine](/reference/kotlin/android/net/http/HttpEngine) | An engine to process [UrlRequest](/reference/kotlin/android/net/http/UrlRequest)s, which uses the best HTTP stack available on the current platform. |\n| [HttpResponseCache](/reference/kotlin/android/net/http/HttpResponseCache) | Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and bandwidth. |\n| [QuicOptions](/reference/kotlin/android/net/http/QuicOptions) | Configuration options for QUIC. |\n| [SslCertificate](/reference/kotlin/android/net/http/SslCertificate) | SSL certificate info (certificate details) class |\n| [SslError](/reference/kotlin/android/net/http/SslError) | This class represents a set of one or more SSL errors and the associated SSL certificate. |\n| [UploadDataProvider](/reference/kotlin/android/net/http/UploadDataProvider) | Abstract class allowing the embedder to provide an upload body to [UrlRequest](/reference/kotlin/android/net/http/UrlRequest). |\n| [UploadDataSink](/reference/kotlin/android/net/http/UploadDataSink) | Defines callbacks methods for [UploadDataProvider](/reference/kotlin/android/net/http/UploadDataProvider). |\n| [UrlRequest](/reference/kotlin/android/net/http/UrlRequest) | Controls an HTTP request (GET, PUT, POST etc). |\n| [UrlResponseInfo](/reference/kotlin/android/net/http/UrlResponseInfo) | Basic information about a response. |\n| [X509TrustManagerExtensions](/reference/kotlin/android/net/http/X509TrustManagerExtensions) | X509TrustManager wrapper exposing Android-added features. |\n\nExceptions\n----------\n\n|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CallbackException](/reference/kotlin/android/net/http/CallbackException) | Exception passed to [UrlRequest.Callback.onFailed()](/reference/kotlin/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)) when [UrlRequest.Callback](/reference/kotlin/android/net/http/UrlRequest.Callback) or [UploadDataProvider](/reference/kotlin/android/net/http/UploadDataProvider) method throws an exception. |\n| [HttpException](/reference/kotlin/android/net/http/HttpException) | Base exception passed to [UrlRequest.Callback.onFailed()](/reference/kotlin/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)). |\n| [InlineExecutionProhibitedException](/reference/kotlin/android/net/http/InlineExecutionProhibitedException) | Thrown when an executor runs a submitted runnable inline in [java.util.concurrent.Executor#execute(Runnable)](../../../java/util/concurrent/Executor.html#execute(java.lang.Runnable)) and [android.net.http.UrlRequest.Builder#setDirectExecutorAllowed](/reference/kotlin/android/net/http/UrlRequest.Builder#setDirectExecutorAllowed(kotlin.Boolean)) was not called. |\n| [NetworkException](/reference/kotlin/android/net/http/NetworkException) | Exception passed to [UrlRequest.Callback.onFailed()](/reference/kotlin/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)) when the HTTP stack fails to process a network request. |\n| [QuicException](/reference/kotlin/android/net/http/QuicException) | Subclass of [NetworkException](/reference/kotlin/android/net/http/NetworkException) which contains a detailed [QUIC](https://www.chromium.org/quic) error code from [QuicErrorCode](https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb). |"]]