From 8a32a7a31e13ff7d122e529e060af0e335fc7456 Mon Sep 17 00:00:00 2001 From: Rodrigo Aguilera Date: Thu, 10 Aug 2023 15:34:14 +0200 Subject: [PATCH] [FEATURE] Add ability to GET custom endpoint Solves #7 --- src/SalesforceFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SalesforceFunctions.php b/src/SalesforceFunctions.php index 51c8c58..c31546e 100644 --- a/src/SalesforceFunctions.php +++ b/src/SalesforceFunctions.php @@ -422,7 +422,7 @@ public function describe($object, $additionalHeaders = []) * @throws GuzzleException * @throws SalesforceException */ - public function customEndpoint($customEndpoint, $data, $successStatusCode = 200, $additionalHeaders = []) + public function customEndpoint($customEndpoint, $data, $successStatusCode = 200, $additionalHeaders = [], $method = 'POST') { /* customEndpoint could be all behind /services/ */ $url = "{$this->instanceUrl}/services/{$customEndpoint}"; @@ -439,7 +439,7 @@ public function customEndpoint($customEndpoint, $data, $successStatusCode = 200, try { $request = $client->request( - 'POST', + $method, $url, [ 'headers' => $headers,