WP_REST_Request::set_method( string $method )

In this article

Sets HTTP method for the request.

Parameters

$methodstringrequired
HTTP method.

Source

public function set_method( $method ) {
	$this->method = strtoupper( $method );
}

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

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