$client = new GuzzleHttp\Client();
$res = $client->send($Request);//$Request为包含请求头请求url及请求方式、参数的对象。也可用$client的其他方法,如get、post等
echo '<pre>';
// 关键代码(获取对象格式数据):json_decode($res->getBody())
print_r(json_decode($res->getBody()));
die;
PHP GuzzleHttp\Client()类 查看返回数据
最新推荐文章于 2024-05-10 09:32:08 发布