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

Commit

Permalink
:octocat: a bit too much...
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Mar 1, 2019
1 parent 56090fd commit 02afac3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Core/OAuthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ public function request(string $path, array $params = null, string $method = nul

}

foreach(array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
$request = $request->withAddedHeader($header, $value);
}

if($body instanceof StreamInterface){
$request = $request->withBody($body);
}
Expand All @@ -325,10 +329,6 @@ public function sendRequest(RequestInterface $request):ResponseInterface{
$token = $this->refreshAccessToken($token);
}

foreach(array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
$request = $request->withAddedHeader($header, $value);
}

$request = $this->getRequestAuthorization($request, $token);
}

Expand Down

0 comments on commit 02afac3

Please sign in to comment.