protected function prepareResponse($responseRaw, RestRequest $request)
    {
        $body = (string) $responseRaw->getBody();
        
        $parsedResult = json_decode($body);
        if ($parsedResult == false) {
            $parsedResult = new \stdClass();
        }
        
        $response = new RestResponse($responseRaw->getStatusCode(), $body, $parsedResult, $request);
        
        return $response;
    }
protected function prepareResponse($responseRaw, RestRequest $request)
    {
        $body = (string) $responseRaw->getBody();
        
        $parsedResult = json_decode($body);
        if ($parsedResult == false) {
            $parsedResult = new \stdClass();
        }
        
        $response = new RestResponse($responseRaw->getStatusCode(), $body, $parsedResult, $request);
        
        return $response;
    }
protected function prepareResponse ( $ responseRaw , RestRequest $ request ) { $ body = ( string ) $ responseRaw -> getBody ( ) ; $ parsedResult = json_decode ( $ body ) ; if ( $ parsedResult == false ) { $ parsedResult = new \ stdClass ( ) ; } $ response = new RestResponse ( $ responseRaw -> getStatusCode ( ) , $ body , $ parsedResult , $ request ) ; return $ response ; }
Prepares the response object for the given raw response object

@param mixed $responseRaw
@param \Zepi\Api\Rest\Entity\Request
@return \Zepi\Api\Rest\Entity\Response
Prepares the response object for the given raw response object