android-components / mozilla.components.lib.fetch.httpurlconnection / HttpURLConnectionClient

HttpURLConnectionClient

class HttpURLConnectionClient : Client (source)

HttpURLConnection implementation of Client.

Constructors

Name Summary
<init> HttpURLConnectionClient()
HttpURLConnection implementation of Client.

Inherited Properties

Name Summary
defaultHeaders val defaultHeaders: Headers
List of default headers that should be added to every request unless overridden by the headers in the request.

Functions

Name Summary
fetch fun fetch(request: Request): Response
Starts the process of fetching a resource from the network as described by the Request object. This call is synchronous.

Companion Object Functions

Name Summary
getOrCreateCookieManager fun getOrCreateCookieManager(): CookieManager

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.
withInterceptors fun Client.withInterceptors(vararg interceptors: Interceptor): Client
Creates a new Client instance that will use the provided list of Interceptor instances.