function FormState::setRequestMethod
Sets the HTTP method used by the request that is building the form.
Parameters
string $method: Can be any valid HTTP method, such as GET, POST, HEAD, etc.
Return value
$this
Overrides FormStateInterface::setRequestMethod
File
- 
              core/
lib/ Drupal/ Core/ Form/ FormState.php, line 604  
Class
- FormState
 - Stores information about the state of a form.
 
Namespace
Drupal\Core\FormCode
public function setRequestMethod($method) {
  $this->requestMethod = strtoupper($method);
  return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.