WP_Http::processResponse( string $strResponse )
Parses the responses and splits the parts into headers and body.
Parameters
- $strResponse
-
(Required) The full response string
Return
(array) Array with 'headers' and 'body' keys.
Source
File: wp-includes/class-http.php
public static function processResponse($strResponse) {
$res = explode("\r\n\r\n", $strResponse, 2);
return array('headers' => $res[0], 'body' => isset($res[1]) ? $res[1] : '');
}
Changelog
Version | Description |
---|---|
WP-2.7.0 | Introduced. |