Closed ta244100 closed 4 years ago
代码贴下。
go(function () {
$saber = Saber::create(['base_uri' => 'http://httpbin.org']);
echo $saber->requests(
[
['get', '/get'],
['post', '/post'],
['patch', '/patch'],
['put', '/put'],
['delete', '/delete']
]
);
});
OK,问题已经找到,requests()的返回结果得先去遍历,才去调用->getParsedJsonArray()处理结果函数,才能看到结果值。
SaberGM::requests() 的返回结果body都是true吗? get又只能单个请求,那么有什么方法批量请求的吗?