HttpAccess

open class HttpAccess

Generic HTTP Access layer - used internally by com.salesforce.androidsdk.rest.RestClient and OAuth2. This class watches network changes as well.

Constructors

Link copied to clipboard
constructor(app: Context, userAgent: String)
Parameterized constructor.

Types

Link copied to clipboard
Exception thrown if the device is offline, during an attempted HTTP call.
Link copied to clipboard
Lightweight identity tag for request attribution without constructing a UserAccount.
Link copied to clipboard
open class UserAgentInterceptor : Interceptor
Interceptor that adds user agent header

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val okHttpClient: OkHttpClient
Link copied to clipboard
val READ_TIMEOUT: Int = 20
Link copied to clipboard
open val userAgent: String

Functions

Link copied to clipboard
open fun createNewClientBuilder(): OkHttpClient.Builder
Creates a new OkHttp Client Builder with appropriate connection spec and user agent interceptor.
Link copied to clipboard
open fun getOkHttpClientBuilder(): OkHttpClient.Builder
Link copied to clipboard
open fun getUnauthenticatedOkHttpBuilder(): OkHttpClient.Builder
Link copied to clipboard
open fun hasNetwork(): Boolean
Returns the status of network connectivity.
Link copied to clipboard
open fun init(app: Context)
Initializes HttpAccess.