Skip to content

Commit 6472739

Browse files
author
Lisandro Bigi
committed
fix: headers not being correctly added
1 parent fc21eb8 commit 6472739

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.es.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ $data = [
186186
"hubId" => "<hubId>", // Required
187187
"workerId" => "<workerId>", // Required
188188
"googleApiKey" => "<googleApiKey>", // Optional
189-
"startDate" => "<startDate>", // Optional
190-
"endDate" => "<endDate>" // Optional
189+
"startDate" => "<startDate>", // Optional - Timestamp format e.g. 1557936000000
190+
"endDate" => "<endDate>" // Optional - Timestamp format e.g. 1557936000000
191191
];
192192

193193
$onfleet->workers->getDeliveryManifest($data);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ $data = [
204204
"hubId" => "<hubId>", // Required
205205
"workerId" => "<workerId>", // Required
206206
"googleApiKey" => "<googleApiKey>", // Optional
207-
"startDate" => "<startDate>", // Optional
208-
"endDate" => "<endDate>" // Optional
207+
"startDate" => "<startDate>", // Optional - Timestamp format e.g. 1557936000000
208+
"endDate" => "<endDate>" // Optional - Timestamp format e.g. 1557936000000
209209
];
210210

211211
$onfleet->workers->getDeliveryManifest($data);

src/Methods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static function method(array $methodData, Onfleet $api, ...$args)
134134
$hasBody = true;
135135
}
136136
if (isset($item['googleApiKey'])) {
137-
$api->api->headers["X-API-Key"] = 'Google ' . $item['googleApiKey'];
137+
$api->api->headers[] = 'X-API-Key: Google ' . $item['googleApiKey'];
138138
}
139139
$queryParams = [];
140140
if (isset($item['startDate'])) {

0 commit comments

Comments
 (0)