WordPress at Your Fingertips
function is not described

WP_HTTP_Response::set_status() public WP 4.4.0

Sets the 3-digit HTTP status code.

{} 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->set_status( $code );
$code(int) (required)
HTTP status.

Changelog

Since 4.4.0 Introduced.

Code of WP_HTTP_Response::set_status() WP 5.8.2

public function set_status( $code ) {
	$this->status = absint( $code );
}