Created
May 2, 2016 00:25
-
-
Save Crell/35006d45c3af1d500d7bc8c687508943 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toJsonResponse(ApiProblem $problem, ResponseInterface $response) | |
| { | |
| $body = $response->getBody(); | |
| $body->rewind(); | |
| $body->write($problem->asJson($this->pretty)); | |
| return $this->toResponse($problem, $response) | |
| ->withHeader('Content-Type', 'application/problem+json') | |
| ->withBody($body); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment