Skip to content

Commit 7735ca5

Browse files
authored
Forgot to add return value to request (#380)
* Forgot to add return value to request * Fix the basic query handler
1 parent dcce996 commit 7735ca5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Client/Credentials/Handler/BasicQueryHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class BasicQueryHandler extends AbstractHandler
1111
public function __invoke(RequestInterface $request, CredentialsInterface $credentials): RequestInterface
1212
{
1313
$credentials = $this->extract(Basic::class, $credentials);
14+
parse_str($request->getUri()->getQuery(), $query);
15+
$query = array_merge($query, $credentials->asArray());
1416

15-
return $request->withUri($request->getUri()->withQuery(http_build_query($credentials->asArray())));
17+
return $request->withUri($request->getUri()->withQuery(http_build_query($query)));
1618
}
1719
}

src/Entity/IterableAPICollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ protected function fetchPage($absoluteUri): void
476476
$request = new Request($requestUri, 'GET');
477477

478478
if ($this->getApiResource()->getAuthHandler()) {
479-
$this->getApiResource()->addAuth($request);
479+
$request = $this->getApiResource()->addAuth($request);
480480
}
481481

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

0 commit comments

Comments
 (0)