WP_REST_Request::set_method

Advertisement

Summery Summery

Sets HTTP method for the request.

Syntax Syntax

WP_REST_Request::set_method( string $method )

Parameters Parameters

$method

(Required) HTTP method.

Source Source

File: wp-includes/rest-api/class-wp-rest-request.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply