RestClient
RestClient allows you to send authenticated HTTP requests to a force.com server.
Constructors
Link copied to clipboard
constructor(clientInfo: RestClient.ClientInfo, authToken: String, httpAccessor: HttpAccess, authTokenProvider: RestClient.AuthTokenProvider)
Constructs a RestClient with the given clientInfo, authToken, httpAccessor and authTokenProvider.
constructor(clientInfo: RestClient.ClientInfo, authToken: String, tokenType: String, httpAccessor: HttpAccess, authTokenProvider: RestClient.AuthTokenProvider)
Constructs a RestClient with the given clientInfo, authToken, tokenType, httpAccessor and authTokenProvider.
constructor(clientInfo: RestClient.ClientInfo, authToken: String, tokenType: String, credentialsIdentifier: String, httpAccessor: HttpAccess, authTokenProvider: RestClient.AuthTokenProvider)
Constructs a RestClient with the given clientInfo, authToken, tokenType, credentialsIdentifier, httpAccessor and authTokenProvider.
Types
Link copied to clipboard
interface AsyncRequestCallback
AsyncRequestCallback interface.
Link copied to clipboard
interface AuthTokenProvider
AuthTokenProvider interface.
Link copied to clipboard
All immutable information for an authenticated client (e.g.
Link copied to clipboard
Network interceptor that does oauth refresh and request retry when access token has expired.
Link copied to clipboard
Exception thrown when refresh token was found to be revoked
Link copied to clipboard
Use a unauthenticated client info when do not need authentication support (e.g.
Properties
Functions
Link copied to clipboard
Builds an OK HTTP request from a REST request.
Link copied to clipboard
Clear caches of org-id/user-id to OkHttpClient.
Remove cached OkHttpClient.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns a new web socket for the provided request and web socket listener.
Link copied to clipboard
Proactively refresh this client's access token through the SDK's standard, app-wide serialized refresh path (the same path used when a request returns 401).
Link copied to clipboard
Send the given restRequest and process the result asynchronously with the given callback.
Link copied to clipboard
Send the given restRequest synchronously and return a RestResponse Note: Cannot be used by code on the UI thread (use sendAsync instead).