getBodyAsString() public method

public getBodyAsString ( Psr\Http\Message\ResponseInterface $response ) : string
$response Psr\Http\Message\ResponseInterface
return string
示例#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);
     }
 }