We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using the salesforce knowledge base endpoint that require a GET HTTP request to fetch data. Currently the custom endpoint is hardcoded to POST.
customEndpoint accepts a new parameter $method which defaults to POST.
customEndpoint
$method
I will just patch the code for my use case.
public function customEndpoint($customEndpoint, $data, $successStatusCode = 200, $additionalHeaders = [], $method = 'POST') { /* customEndpoint could be all behind /services/ */ $url = "{$this->instanceUrl}/services/{$customEndpoint}"; $headers = $this->getHeaders( [ 'Authorization' => "OAuth {$this->accessToken}", 'Content-type' => 'application/json', ], $additionalHeaders ); $client = new Client(); try { $request = $client->request( $method, $url, [ 'headers' => $headers, 'json' => $data ] ); $status = $request->getStatusCode(); } catch (ClientException $e) { throw SalesforceException::fromClientException($e); }
The text was updated successfully, but these errors were encountered:
[FEATURE] Add ability to GET custom endpoint
8a32a7a
Solves Kephson#7
Hi, thanks for implementing that; I merged your pull request and will release a new version.
Sorry, something went wrong.
closed with new release 1.1.3, thanks for the pull request: https://github.com/Kephson/php-salesforce-rest-api/releases/tag/1.1.3
No branches or pull requests
Summary / Description
I am using the salesforce knowledge base endpoint that require a GET HTTP request to fetch data. Currently the custom endpoint is hardcoded to POST.
Describe the solution you'd like
customEndpoint
accepts a new parameter$method
which defaults to POST.Describe alternatives you've considered
I will just patch the code for my use case.
Possible solution
The text was updated successfully, but these errors were encountered: