Skip to content

Commit

Permalink
Forgot to add return value to request (#380)
Browse files Browse the repository at this point in the history
* Forgot to add return value to request

* Fix the basic query handler
  • Loading branch information
SecondeJK authored Feb 28, 2023
1 parent dcce996 commit 7735ca5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Client/Credentials/Handler/BasicQueryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class BasicQueryHandler extends AbstractHandler
public function __invoke(RequestInterface $request, CredentialsInterface $credentials): RequestInterface
{
$credentials = $this->extract(Basic::class, $credentials);
parse_str($request->getUri()->getQuery(), $query);
$query = array_merge($query, $credentials->asArray());

return $request->withUri($request->getUri()->withQuery(http_build_query($credentials->asArray())));
return $request->withUri($request->getUri()->withQuery(http_build_query($query)));
}
}
2 changes: 1 addition & 1 deletion src/Entity/IterableAPICollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ protected function fetchPage($absoluteUri): void
$request = new Request($requestUri, 'GET');

if ($this->getApiResource()->getAuthHandler()) {
$this->getApiResource()->addAuth($request);
$request = $this->getApiResource()->addAuth($request);
}

$response = $this->client->send($request);
Expand Down

0 comments on commit 7735ca5

Please sign in to comment.