getBodyAsString() public method

public getBodyAsString ( Psr\Http\Message\ResponseInterface $response ) : string
$response Psr\Http\Message\ResponseInterface
return string
Ejemplo n.º 1
0
 /**
  * @param \Psr\Http\Message\ResponseInterface $response
  * @throws \Exception
  */
 public function validateBody(ResponseInterface $response)
 {
     $errors = $this->validateMessage($this->deserializer->getBodyAsString($response));
     if (empty($errors) === false) {
         throw $this->exceptionFactory->createResponseBodyInvalidJsonApiException($response, $errors, $this->includeOriginalMessage);
     }
 }