WP_Http::processResponse( string $response )
Parses the responses and splits the parts into headers and body.
Parameters
- $response
-
(Required) The full response string.
Return
(array) Array with response headers and body.<br>
- 'headers'
(string) HTTP response headers.<br> - 'body'
(string) HTTP response body.<br>
Source
File: wp-includes/class-wp-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 |
---|---|
2.7.0 | Introduced. |