Core Class
View Source on Trac ↗
Core Class
WP_HTTP_Response
class WP_HTTP_Response
// Constructor: function Object() { [native code] } Core class used to prepare HTTP responses.
Methods 9 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor.
Parameters: $data: mixed, $status: mixed, $headers: mixed |
| get_headers() array | Retrieves headers associated with the response. |
| set_headers() void | Sets all header values.
Parameters: $headers: mixed |
| header() void | Sets a single HTTP header.
Parameters: $key: mixed, $value: mixed, $replace: mixed |
| get_status() int | Retrieves the HTTP return code for the response. |
| set_status() void | Sets the 3-digit HTTP status code.
Parameters: $code: mixed |
| get_data() mixed | Retrieves the response data. |
| set_data() void | Sets the response data.
Parameters: $data: mixed |
| jsonSerialize() mixed | Retrieves the response data for JSON serialization. |
Properties
| Property / Type | Description |
|---|---|
| $data mixed public | No description available. |
| $headers mixed public | No description available. |
| $status mixed public | No description available. |
Class Information
Since Version
4.4.0
Source File
wp-includes/class-wp-http-response.php
Advertisement