WordPress at Your Fingertips
function is not described

WP_HTTP_Response::__construct() public WP 4.4.0

Constructor.

{} It's a method of the class: WP_HTTP_Response{}

No Hooks.

Return

null. Nothing.

Usage

$WP_HTTP_Response = new WP_HTTP_Response();
$WP_HTTP_Response->__construct( $data, $status, $headers );
$data(mixed)
Response data.
Default: null
$status(int)
HTTP status code.
Default: 200
$headers(array)
HTTP header map.
Default: empty array

Changelog

Since 4.4.0 Introduced.

Code of WP_HTTP_Response::__construct() WP 5.8.2

public function __construct( $data = null, $status = 200, $headers = array() ) {
	$this->set_data( $data );
	$this->set_status( $status );
	$this->set_headers( $headers );
}