WordPress at a glance
function is not described

WP_REST_Server::set_status() protected WP 4.4.0

Sends an HTTP status code.

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

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_status( $code );
$code(int) (required)
HTTP status.

Changelog

Since 4.4.0 Introduced.

Code of WP_REST_Server::set_status() WP 5.5.1

<?php
protected function set_status( $code ) {
	status_header( $code );
}