Requests::parse_multiple

Advertisement

Summery Summery

Callback for transport.internal.parse_response

Syntax Syntax

Requests::parse_multiple( string $response, array $request )

Description Description

Internal use only. Converts a raw HTTP response to a Requests_Response while still executing a multiple request.

Parameters Parameters

$response

(Required) Full response text including headers and body (will be overwritten with Response instance)

$request

(Required) Request data as passed into Requests::request_multiple()

Return Return

(null) $response is either set to a Requests_Response instance, or a Requests_Exception object

Source Source

File: wp-includes/class-requests.php

	 * @return null `$response` is either set to a Requests_Response instance, or a Requests_Exception object
	 */
	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;

Advertisement

Advertisement

Leave a Reply