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

(string) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.