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