OkHttp: The Underlying Network Library

Beginning with Mobile SDK 4.2, the Android REST request system uses OkHttp (v3.2.0), an open-source external library from Square Open Source, as its underlying architecture. This library replaces the Google Volley library from past releases. As a result, Mobile SDK no longer defines the WrappedRestRequest class.

The following examples show how to perform some common network operations with OkHttpClient.

Common Imports

To get the handle of the OkHttpClient that the current RestClient instance is using:

Kotlin

Java

Kotlin

Java

Kotlin

Java

Kotlin

Java

Kotlin

Java

For more information, see square.github.io/okhttp/.