Fatal error: Call to undefined method GuzzleHttp\\Client::request() with Guzzle 6

邮差的信 提交于 2019-11-29 13:40:55

I am also using guzzle, and its working for me, Try like this

use GuzzleHttp;
use GuzzleHttp\Subscriber\Oauth\Oauth1;

$client = new GuzzleHttp\Client();

And to get response try this

$response = $client->request('GET', 'tournaments',['query' => ['base_uri' => getenv('URL_BASE').'api/v1/']]);

OR try this if not work

$response = $client->request('GET', getenv('URL_BASE').'api/v1/tournaments');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!