Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 02afac3

Browse files
committed
:octocat: a bit too much...
1 parent 56090fd commit 02afac3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Core/OAuthProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ public function request(string $path, array $params = null, string $method = nul
302302

303303
}
304304

305+
foreach(array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
306+
$request = $request->withAddedHeader($header, $value);
307+
}
308+
305309
if($body instanceof StreamInterface){
306310
$request = $request->withBody($body);
307311
}
@@ -325,10 +329,6 @@ public function sendRequest(RequestInterface $request):ResponseInterface{
325329
$token = $this->refreshAccessToken($token);
326330
}
327331

328-
foreach(array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
329-
$request = $request->withAddedHeader($header, $value);
330-
}
331-
332332
$request = $this->getRequestAuthorization($request, $token);
333333
}
334334

0 commit comments

Comments
 (0)