Android.Net.Http Namespace

Provides types for HTTP networking on Android.

Classes

Name Description
AndroidHttpClient

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android.

BidirectionalStream

Class for bidirectional sending and receiving of data over HTTP/2 or QUIC connections.

BidirectionalStream.Builder

Builder for BidirectionalStreams.

CallbackException

Exception passed to UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed() when UrlRequest.Callback or UploadDataProvider method throws an exception.

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.

FinishedRequestTimings

Metrics collected for a single request.

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.

HttpException

Base exception passed to UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed().

HttpResponseCache

Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and bandwidth.

InlineExecutionProhibitedException

Thrown when an executor runs a submitted runnable inline in java.util.concurrent.Executor#execute(Runnable) and UrlRequest.Builder#setDirectExecutorAllowed was not called.

NetworkException

Exception passed to UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed() when the HTTP stack fails to process a network request.

Proxy

Represents a proxy that can be used by HttpEngine.

Proxy.HttpConnectCallback

Provides the legacy constants for HTTP CONNECT callback response actions.

Proxy.IHttpConnectCallback.Request

Represents an HTTP CONNECT request being sent to the proxy server.

ProxyOptions

Defines a proxy configuration that can be used by HttpEngine.

QuicException

Subclass of NetworkException which contains a detailed QUIC error code from QuicErrorCode.

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: <ul> <li>the most specific common name (CN)</li> <li>the most specific organization (O)</li> <li>the most specific organizational unit (OU)</li> <ul>

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 #getStatus.

UrlRequest.StatusEventArgs

Contains a URL request status value.

UrlResponseInfo

Basic information about a response.

X509TrustManagerExtensions

X509TrustManager wrapper exposing Android-added features.

Interfaces

Name Description
BidirectionalStream.ICallback

Callback interface used to receive callbacks from a BidirectionalStream.

Proxy.IHttpConnectCallback

Controls tunnels established via HTTP CONNECT.

UrlRequest.ICallback

Users of the HTTP stack extend this class to receive callbacks indicating the progress of a UrlRequest being processed.

UrlRequest.IStatusListener

Listener interface used with #getStatus to receive the status of a UrlRequest.

Enums

Name Description
AllProxiesFailedBehavior

Specifies the behavior when every configured proxy has failed.

BidirectionalStreamPriority

Specifies the priority of a bidirectional stream.

ConnectionMigrationOption

Specifies whether a connection migration option is enabled.

DnsOption

Specifies whether a DNS option is enabled.

HttpCacheType

Specifies the HTTP engine's cache configuration.

HttpProxyScheme

Specifies how the HTTP engine connects to a proxy.

NetworkExceptionErrorReason

Identifies the reason for a network exception.

OnResponseReceivedAction

Specifies the action to take after an HTTP CONNECT response.

SslErrorType

Enumerates values returned by several types and taken as a parameter of several methods of SslError.

UrlRequestPriority

Specifies the priority of a URL request.

UrlRequestStatus

Identifies the status of a URL request.

Remarks

Includes types for requests, responses, response caching, and X.509 certificates.