Skip to content

Commit

Permalink
Merge pull request #45 from lfbn/add-status-code-to-print-response
Browse files Browse the repository at this point in the history
Add status to print request and response
  • Loading branch information
shouze committed Feb 29, 2016
2 parents c885c5f + f1fec7f commit 8f284e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RestApiContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ public function printResponse()
$response = $this->getResponse();

echo sprintf(
"%s %s :\n%s%s\n",
"%s %s :\n%s %s\n%s%s\n",
$request->getMethod(),
$request->getUri()->__toString(),
$response->getStatusCode(),
$response->getReasonPhrase(),
$this->getRawHeaders($response->getHeaders()),
$response->getBody()
);
Expand Down

0 comments on commit 8f284e3

Please sign in to comment.