Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

REST Request Class

The RestRequest interface provides an uncomplicated way to make network calls.
Swift Objective-C
RestRequest SFRestRequest

This class is the container for your request metadata, but you rarely manipulate the request object manually. The request object itself formats its metadata for transmission over HTTP. To send your requests to the Salesforce server, the RestRequest object configures the network parameters and the REST API syntax. If the object was created for a Salesforce resource, the class knows how to calculate the endpoint. Otherwise, you configure a custom path.

RestRequest—not RestClient— provides methods for configuring a REST request that isn’t explicitly supported by Mobile SDK. For example, to use the Connect REST API or an external service, you manually create and configure a RestRequest object.