protected function getResponseContent(ResponseInterface $rawResponse)
    {
        // First check that content in response exists, due too bug: https://bugs.php.net/bug.php?id=54484
        $content = (string) $rawResponse->getBody();
        if (!$content) {
            return [];
        }

        $response = json_decode($content, true);
        if (JSON_ERROR_NONE !== json_last_error()) {
            parse_str($content, $response);
        }

        return $response;
    }
protected function getResponseContent(ResponseInterface $rawResponse)
    {
        // First check that content in response exists, due too bug: https://bugs.php.net/bug.php?id=54484
        $content = (string) $rawResponse->getBody();
        if (!$content) {
            return [];
        }

        $response = json_decode($content, true);
        if (JSON_ERROR_NONE !== json_last_error()) {
            parse_str($content, $response);
        }

        return $response;
    }
protected function getResponseContent ( ResponseInterface $ rawResponse ) { // First check that content in response exists, due too bug: https://bugs.php.net/bug.php?id=54484 $ content = ( string ) $ rawResponse -> getBody ( ) ; if ( ! $ content ) { return [ ] ; } $ response = json_decode ( $ content , true ) ; if ( JSON_ERROR_NONE !== json_last_error ( ) ) { parse_str ( $ content , $ response ) ; } return $ response ; }
Get the 'parsed' content based on the response headers.

@param ResponseInterface $rawResponse

@return array
Get the parsed content based on the response headers .