omniphx / forrest

A Laravel library for Salesforce
https://omniphx.github.io/forrest/
MIT License
257 stars 120 forks source link

Receive headers in response #353

Open marinakosolap opened 1 month ago

marinakosolap commented 1 month ago

Hi there. I'm working with Bulk API 2.0 Query right now - https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/query_get_job_results.html And I need header Sforce-Locator to understand if there are more records for my result or not. And get all of them if there are more. Like it is described in Salesforce docs.

Is there a way to get response headers?

I do query like Forrest::jobs( '/query/' . $jobId . '/results?maxRecords=10000', ['method' => 'get', 'format' => 'csv'] );

marinakosolap commented 1 month ago

It is not relevant anymore. I found out that raw response can be received by setting 'format' => 'raw'. But I found this information going through the code of the library. So it would be great if this can be added to readme or documentation - values which can be set for format.