Requests::parse_multiple()public staticWP 1.0

Callback for transport.internal.parse_response

Internal use only. Converts a raw HTTP response to a \WpOrg\Requests\Response while still executing a multiple request.

$response is either set to a \WpOrg\Requests\Response instance, or a \WpOrg\Requests\Exception object

Метод класса: Requests{}

Хуков нет.


null. Ничего (null).


$result = Requests::parse_multiple( $response, $request );
$response(строка) (обязательный) (передается по ссылке — &)
Full response text including headers and body (will be overwritten with Response instance)
$request(массив) (обязательный)
Request data as passed into \WpOrg\Requests\Requests::request_multiple()

Код Requests::parse_multiple() WP 6.4.1

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 (Exception $e) {
		$response = $e;