WpOrg\Requests
Requests::parse_multiple()
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
Method of the class: Requests{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = Requests::parse_multiple( $response, $request );
- $response(string) (required) (passed by reference — &)
- Full response text including headers and body (will be overwritten with Response instance)
- $request(array) (required)
- Request data as passed into \WpOrg\Requests\Requests::request_multiple()
Requests::parse_multiple() Requests::parse multiple code WP 6.6.2
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; } }