Skip to content

Commit

Permalink
Update ApiLoggerMiddleware.php
Browse files Browse the repository at this point in the history
Does not change the test, but adds functionality, so that any other event after this reading the data is available.
  • Loading branch information
slejnej authored Mar 25, 2021
1 parent 442efb8 commit b9a0275
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Middleware/ApiLoggerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public function handleResponse(RequestInterface $request, ResponseInterface $res
$response->getBody()->getContents()
);

/**
* need to rewind the contents so it can be retrieved later!!!
*/
$response->getBody()->rewind();

return $next($request, $response);
}
}

0 comments on commit b9a0275

Please sign in to comment.