$client = new \GuzzleHttp\Client();
$res = $client->request('GET', 'http://127.0.0.1/slim_project/getall',
array(
'headers' => array(
'Authorization' => "Bearer fghfghfgh-sdfsdfs-sdfsdf}",
)
)
);
$data = $response->withBody($res->getBody());
return $this->renderer->render($data->getBody(), 'pages/tables.php');
When i run the code. i got this error.
Argument 1 passed to Slim\Views\PhpRenderer::render() must implement interface Psr\Http\Message\ResponseInterface, instance of GuzzleHttp\Psr7\Stream given, called in /var/www/html/slim_project/index.php on line 101 and defined
How Can i convert Guzzle to psr/http\message. That how can i use this.
Thanks in advance.