WP_HTTP_Requests_Response::__construct() WordPress Method
The WP_HTTP_Requests_Response::__construct() function is used to construct an HTTP request response object. This function is used to set the headers, body, and status code of the response.
WP_HTTP_Requests_Response::__construct( Requests_Response $response, string $filename = '' ) #
Constructor.
Parameters
- $response
(Requests_Response)(Required)HTTP response.
- $filename
(string)(Optional) File name.
Default value: ''
Source
File: wp-includes/class-wp-http-requests-response.php
public function __construct( Requests_Response $response, $filename = '' ) { $this->response = $response; $this->filename = $filename; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |