WP_HTTP_Requests_Response::get_data() WordPress Method
The WP_HTTP_Requests_Response::get_data() function is used to get the body of the HTTP response. This can be useful for tasks such as validating the response body against a schema or parsing the response body into JSON.
WP_HTTP_Requests_Response::get_data() #
Retrieves the response data.
Return
(string) Response data.
Source
File: wp-includes/class-wp-http-requests-response.php
public function get_data() {
return $this->response->body;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |