private function processHttpResponse($response)
    {
        if ($response === null) {
            return null;
        }

        switch ($this->fakeType) {
            case 'pngb64':
                $base64 = base64_encode($response->getBody());
                return 'data:image/png;base64,' . $base64;
            case 'object': // 'object' not supported yet, we return array instead.
            case 'array':
                return json_decode($response->getBody(), true);
            default:
                return $response->getBody()->__toString();
        }
    }
private function processHttpResponse($response)
    {
        if ($response === null) {
            return null;
        }

        switch ($this->fakeType) {
            case 'pngb64':
                $base64 = base64_encode($response->getBody());
                return 'data:image/png;base64,' . $base64;
            case 'object': // 'object' not supported yet, we return array instead.
            case 'array':
                return json_decode($response->getBody(), true);
            default:
                return $response->getBody()->__toString();
        }
    }
private function processHttpResponse ( $ response ) { if ( $ response === null ) { return null ; } switch ( $ this -> fakeType ) { case 'pngb64' : $ base64 = base64_encode ( $ response -> getBody ( ) ) ; return 'data:image/png;base64,' . $ base64 ; case 'object' : // 'object' not supported yet, we return array instead. case 'array' : return json_decode ( $ response -> getBody ( ) , true ) ; default : return $ response -> getBody ( ) -> __toString ( ) ; } }
Parses the response to the desired return type.

@param \Psr\Http\Message\ResponseInterface $response Response sent by the Proxmox server.

@return mixed The parsed response, depending on the response type can be
an array or a string.
Parses the response to the desired return type .