Core Class
View Source on Trac ↗
Core Class
WP_HTTP_Requests_Response
class WP_HTTP_Requests_Response
// Constructor: function Object() { [native code] } Core wrapper object for a WpOrg\Requests\Response for standardization.
Methods 11 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor.
Parameters: $response: WpOrg\Requests\Response, $filename: mixed |
| get_response_object() WpOrg\Requests\Response | Retrieves the response object for the request. |
| get_headers() \WpOrg\Requests\Utility\CaseInsensitiveDictionary | 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() string | Retrieves the response data. |
| set_data() void | Sets the response data.
Parameters: $data: mixed |
| get_cookies() WP_HTTP_Cookie[] | Retrieves cookies from the response. |
| to_array() array | Converts the object to a WP_Http response array. |
Properties
| Property / Type | Description |
|---|---|
| $response mixed public | No description available. |
| $filename mixed public | No description available. |
Class Information
Since Version
4.6.0
Source File
wp-includes/class-wp-http-requests-response.php
Advertisement