Skip to content

Commit

Permalink
[FEATURE] Add ability to GET custom endpoint
Browse files Browse the repository at this point in the history
Solves Kephson#7
  • Loading branch information
rodrigoaguilera committed Aug 10, 2023
1 parent 0256d80 commit 8a32a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SalesforceFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
Expand All @@ -439,7 +439,7 @@ public function customEndpoint($customEndpoint, $data, $successStatusCode = 200,

try {
$request = $client->request(
'POST',
$method,
$url,
[
'headers' => $headers,
Expand Down

0 comments on commit 8a32a7a

Please sign in to comment.