Requests_Session::request_multiple()
最后更新于:2021-11-26 04:04:49
Requests_Session::request_multiple( array$requests, array$options=array())Send multiple HTTP requests simultaneously
参数
- $requests
-
(array) (Required) Requests data (see Requests::request_multiple)
- $options
-
(array) (Optional) Global and default options (see Requests::request)
Default value: array()
响应
(array) Responses (either Requests_Response or a Requests_Exception object)
源文件
文件: gc-includes/Requests/Session.php
public function request_multiple($requests, $options = array()) {
foreach ($requests as $key => $request) {
$requests[$key] = $this->merge_request($request, false);
}
$options = array_merge($this->options, $options);
// Disallow forcing the type, as that's a per request setting
unset($options['type']);
return Requests::request_multiple($requests, $options);
}