public function HttpClientWrapper::retrieveResponse in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/Client/HttpClientWrapper.php \Drupal\salesforce\Client\HttpClientWrapper::retrieveResponse()
- 5.0.x src/Client/HttpClientWrapper.php \Drupal\salesforce\Client\HttpClientWrapper::retrieveResponse()
File
- src/
Client/ HttpClientWrapper.php, line 34
Class
- HttpClientWrapper
- Wraps Guzzle HTTP client for an OAuth ClientInterface.
Namespace
Drupal\salesforce\ClientCode
public function retrieveResponse(UriInterface $endpoint, $requestBody, array $extraHeaders = [], $method = 'POST') {
$response = $this->httpClient
->request($method, $endpoint
->getAbsoluteUri(), [
'headers' => $extraHeaders,
'form_params' => $requestBody,
]);
return $response
->getBody()
->getContents();
}