WP_HTTP_Response::__construct( mixed $data = null, int $status = 200, array $headers = array() )

Constructor.


Parameters

$data mixed Optional
Response data.

Default: null

$status int Optional
HTTP status code.

Default: 200

$headers array Optional
HTTP header map.

Default: array()


Top ↑

Source

File: wp-includes/class-wp-http-response.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.