Set the next request's method
Validated the passed method and sets it.
string $method:
InvalidArgumentException
public function setMethod($method) {
if (!is_string($method) or !preg_match('/^[A-Z]+$/', $method)) {
throw new InvalidArgumentException("Invalid HTTP request method.");
}
$this->method = $method;
return $this;
}