public function RestClientInterface::apiCall in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/Rest/RestClientInterface.php \Drupal\salesforce\Rest\RestClientInterface::apiCall()
- 5.0.x src/Rest/RestClientInterface.php \Drupal\salesforce\Rest\RestClientInterface::apiCall()
Make a call to the Salesforce REST API.
Parameters
string $path: Path to resource. If $path begins with a slash, the resource will be considered absolute, and only the instance URL will be pre-pended. This can be used, for example, to issue an API call to a custom Apex Rest endpoint. If $path does not begin with a slash, the resource will be considered relative and the Rest API Endpoint will be pre-pended.
array $params: Parameters to provide.
string $method: Method to initiate the call, such as GET or POST. Defaults to GET.
bool $returnObject: If true, return a Drupal\salesforce\Rest\RestResponse; Otherwise, return json-decoded response body only. Defaults to FALSE for backwards compatibility.
Return value
mixed Response object or response data.
Throws
\GuzzleHttp\Exception\RequestException
1 method overrides RestClientInterface::apiCall()
- RestClient::apiCall in src/
Rest/ RestClient.php - Make a call to the Salesforce REST API.
File
- src/
Rest/ RestClientInterface.php, line 50
Class
- RestClientInterface
- Objects, properties, and methods to communicate with the Salesforce REST API.
Namespace
Drupal\salesforce\RestCode
public function apiCall($path, array $params = [], $method = 'GET', $returnObject = FALSE);