Set the request method to use

@param string $method Recommended use of Client class constants
@throws RuntimeException
@return \Slice\Http\Client
968316
public function setMethod($method = self::GET)
	{
		if (in_array($method, $this->allowedMethods)) {
			$this->method = $method;
		} else {
			throw new RuntimeException('Invalid method setted.');
		}
		
		return $this;
	}
1286549
public function withMethod($method): RequestInterface
    {
        $method = $this->filterMethod($method);

        $clone = clone $this;
        $clone->originalMethod = $method;
        $clone->method = null;

        return $clone;
    }
370055
public function method($method = 'POST')
    {
        if (strtolower($method) == 'put') {
            $this->hidden('_method')->default($method);

            return $this;
        }

        return $this->attribute('method', strtoupper($method));
    }
398386
public function set(string $link = null, string $method = null): \TheCMSThread\Classes\API
    {
        if ($link === null) {
            if (isset($_SERVER['REQUEST_URI']) === false) {
                $_SERVER['REQUEST_URI'] = '/';
            }
            $link = str_replace("?" . $_SERVER["QUERY_STRING"], "", $_SERVER["REQUEST_URI"]);
        }
        $link = '/' . trim($link, '/');

        if ($method === null) {
            if (isset($_SERVER['REQUEST_METHOD']) === false) {
                $_SERVER['REQUEST_METHOD'] = 'GET';
            }
            $method = $_SERVER['REQUEST_METHOD'];
        }
        if ($method == 'POST' && empty($_POST['_method']) === false) {
            $method = $_POST['_method'];
            unset($_POST['_method']);
        }

        $this->match = $this->router->match($link, $method);
        return $this;
    }
396233
public function setChildrenMethod($method)
    {
        // Check method is valid
        if (!$this->rootNode->hasMethod($method)) {
            throw new InvalidArgumentException(sprintf(
                "Can't find the method '%s' on class '%s' for getting tree children",
                $method,
                get_class($this->rootNode)
            ));
        }
        $this->childrenMethod = $method;
        return $this;
    }
122548
protected function setMethod($method)
    {
        switch (strtoupper($method)) {
            case 'HEAD':
                curl_setopt($this->request, CURLOPT_NOBODY, true);
                break;
            case 'GET':
                curl_setopt($this->request, CURLOPT_HTTPGET, true);
                break;
            case 'POST':
                curl_setopt($this->request, CURLOPT_POST, true);
                break;
            default:
                curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
        }
    }
109777
public function setMethod(string $method = 'POST'): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->method = $method;
        }

        return $this;
    }
578781
public function setMethod($method) {
        if (!is_string($method))                 throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method));
        if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method);

        $this->method = $method;
        return $this;
    }
729089
public function setMethod($method)
    {
        if (in_array(strtolower($method), ['publish', 'patch', 'move', 'swap'])) {
            $this->headers['X-HTTP-Method-Override'] = $method;
            $this->method = 'POST';
        } else {
            $this->method = strtoupper($method);
        }
    }
448187
public final function withMethod($method): RequestInterface
   {
       if (!is_string($method)
        || !($toUpperMethod = strtoupper((string) $method))
        || $toUpperMethod !== $this->parseMethod($method)) {
           throw new InvalidArgumentException(
               "Can't get instance for method: " . $method . " not supported");
       }
       return $this->with("method", $toUpperMethod);
   }
10081
public function setDigestMethod($method)
	{
		if (array_key_exists($method, $this->openSSLAlgoMapping) &&
			array_key_exists($method, $this->digestMethodUriMapping))
		{
			$this->digestMethod = $method;
		}
		else
		{
			trigger_error(sprintf('The chosen digest method (%s) is not supported', $method), E_USER_WARNING);
		}
		
		$this->checkDigestSupport();
		
		return $this;
	}
1112861
public function setMethod(string $method): self
    {
        assert(
            ($availableMethods = openssl_get_cipher_methods(true)) !== false &&
            in_array($method, $availableMethods) === true
        );

        $this->method = $method;

        return $this;
    }
1128152
private function redirect($method) {

		$this -> setUrl();
		$this -> setDomain();
		$this -> setMethod($method);
		
		Router :: setRedirect(true);

		return Router :: execute();
	}
733096
public function setMethod($method) {
        if (isset(static::$_methodOptionMap[$method])) {
            return $this->setOption(static::$_methodOptionMap[$method],true);
        } else {
            return $this->setOption(CURLOPT_CUSTOMREQUEST,$method);
        }
    }
372224
public function method($method = null)
    {
        if ($method === null) {
            return $this->get('REQUEST_METHOD');
        }
        $this->set("REQUEST_METHOD", $method);
        return $this;
    }
982653
protected function setRequestMethod($method) {
    switch (strtoupper($method)) {
      case 'HEAD':
        curl_setopt($this->request, CURLOPT_NOBODY, true);
        break;
      case 'GET':
        # Hack to allow a request body to be set via CURLOPT_POSTFIELDS
        # for GET requests.
        curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, 'GET');
        break;
      case 'POST':
        curl_setopt($this->request, CURLOPT_POST, true);
        break;
      default:
        curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
    }
  }
749366
public function withMethod($method)
    {
        $method = strtoupper($method);

        if (false === in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'OPTIONS', 'DELETE'])) {
            throw new \InvalidArgumentException(
                sprintf('Invalid HTTP method: %s', $method)
            );
        }

        return $this->_clone('method', $method);
    }