Requests::parse_multiple()
最后更新于:2021-11-25 23:43:19
Requests::parse_multiple( string$response, array$request)Callback for transport.internal.parse_response
参数
- $response
-
(string) (Required) Full response text including headers and body (will be overwritten with Response instance)
- $request
-
(array) (Required) Request data as passed into Requests::request_multiple()
响应
(null) $response
is either set to a Requests_Response instance, or a Requests_Exception object
源文件
文件: gc-includes/class-requests.php
public static function parse_multiple(&$response, $request) {
try {
$url = $request['url'];
$headers = $request['headers'];
$data = $request['data'];
$options = $request['options'];
$response = self::parse_response($response, $url, $headers, $data, $options);
}
catch (Requests_Exception $e) {
$response = $e;
}
}