forrest
forrest copied to clipboard
Return Headers with CSV Formatter
The CSV Formatter could be used with Bulk Imports that will return more data than a single request can handle.
Rather that only including the $request->getBody() the interface allows for returning an array.
If this is not a viable option because of its potential to break other implementations that expect the I'm happy to create a new formatter
$data = Forrest::get(
"/services/data/v59.0/jobs/query/" . $bulkJob["id"] . "/results?locator=" . $locator_id . "",
[],
[
"format" => "csv",
"Accept" => "text/csv"
]
);
// $data['header']['Sforce-Locator'] is set if the bulk job requires multiple requests to download results.
Thanks!
Hi @zack-carlson, since this would be a breaking change would you mind creating a new formatter for this? Maybe something called CsvFormatterWithHeaderes? In the next major version bump, I can deprecate it and combine them into a single formatter
Updated! Let me know.