Skip to content

Commit

Permalink
Rewind body before fetching contents
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrv authored Nov 23, 2023
1 parent 20b68e7 commit 55cc934
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SearchClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ private function search(SearchQueryInterface $searchQuery, $type): PagedCollecti

$result = $this->client->request('GET', $type, $options);

return $this->serializer->deserialize($result->getBody()->getContents());
$body = $result->getBody();
$body->rewind();

return $this->serializer->deserialize($body->getContents());
}
}

0 comments on commit 55cc934

Please sign in to comment.