Set the HTTP methods the mapping will be able to handle.

@param  string $method - HTTP method verb

@return $this

@throws StrutsConfigException on configuration errors
967637
public function setMethod($method) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $name = $this->name ? ' name="'.$this->name.'"':'';
        $path = $this->path ? ' path="'.$this->path.'"':'';

        $method = strtoupper($method);
        if ($method!='GET' && $method!='POST') throw new StrutsConfigException('<mapping'.$name.''.$path.' methods="'.func_get_arg(0).'":  Invalid HTTP method.');

        $this->methods[$method] = true;
        return $this;
    }
1032824
public function setPaymentMethod($method)
    {
        try {
            if ($method instanceof PagSeguroDirectPaymentMethods) {
                $this->paymentMethod = $method;
            } else {
                $this->paymentMethod = new PagSeguroDirectPaymentMethods($method);
            }
        } catch (Exception $e) {
            die($e->getMessage());
        }
    }
786914
public function setHttpMethod($method)
    {
        $allowedMethods = array(
             'POST',
             'PUT',
             'GET',
             'DELETE',
             'PATCH'
        );
        if (!in_array(strtoupper($method), $allowedMethods)) {
            throw new \InvalidArgumentException('Provided method not allowed');
        }
        $this->httpMethod = strtoupper($method);
        return $this;
    }
1036653
public function setMethod($method)
    {
        if (is_string($method))
            $method = explode('|', $method);

        $this->method = array_map('strtoupper', $method);

        return $this;
    }
1016443
public final function setMethod($method)
    {
        if (preg_match('/get|post|put|delete/i', $method, $matches) !== 1) {

            throw new ehough_shortstop_api_exception_InvalidArgumentException(
                'Method must be PUT, GET, POST, or DELETE'
            );
        }

        $this->_method = strtoupper($method);
    }
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);
    }
  }
752249
public function withMethod(string $method): self {
        if ($this->method === $method) {
            return $this;
        }

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

        return $clone;
    }
1081441
public function setMethod(string $method) : Request
    {
        $this->method = $this->fixMethodCase($method);

        return $this;
    }
345883
public function setMethod( $method, $resetStatus = TRUE ){
		$this->validateMethod( $method );
		if( $this->method !== $method ){
			$this->method	= $method;
			if( $resetStatus )
				$this->status	= self::STATUS_UNKNOWN;
		}
		return $this;
	}
1150016
public function setMethod($method = '')
    {
        if (mb_strlen($method) == 0) {
            $this->debug->debug(__FUNCTION__, 'Set Default Method = GET if $method is does not exist');
            $method = 'GET';
        } else {
            $method       = strtoupper($method);
            $validMethods = [
                'GET',
                'HEAD',
                'PUT',
                'POST',
                'DELETE'
            ];
            if (!in_array($method, $validMethods)) {
                $message = "Error: " . __CLASS__ . ": The requested method (${method}) is not valid here";
                $this->debug->error(__FUNCTION__, $message);

                return $message;
            }
        }
        $this->method = $method;

        return $this;
    }
1211214
public function setMethod($method)
    {
        foreach ($this->routes as $route)
            $route->setMethod($method);
        return $this;
    }
912182
public function method($method = null)
    {
        if (func_num_args() === 0) {
            return $this->_method;
        }
        $this->_method = strtoupper($method);
        return $this;
    }
1352942
public function setTransport($method=null){
        switch($method){
            case "stream":
                $this->defaultOptions= array_merge_recursive($this->defaultOptions,[
                    'stream'        => true,
                    'stream_context' => [
                        'ssl' => [
                            'verify_peer' => false,
                            'verify_peer_name' => false,
                            'allow_self_signed' => true
                        ]
                    ]
                ]);
                break;
            case "curl":
            default:
                $method = 'curl';
                break;
        }
        $this->transportMethod = $method;
        return $this->initClient(); 
    }
1040370
public function setMethodOverride($method = NULL)
	{
		if($method === NULL)
		{
			$this->methodOverride = NULL;
		}
		else
		{
			$method = strtoupper($method);
			
			if(!preg_match("'^[A-Z]{2,}$'", $method))
			{
				throw new \InvalidArgumentException(sprintf('Invalid HTTP request method: "%s"', $method));
			}
			
			$this->methodOverride = $method;
		}
		
		return $this;
	}
358397
public final function setMethodArguments(string $method, array $methodArguments): self
    {
        $this->methodArguments[$method] = $methodArguments;

        return $this;
    }
38319
public function setHttpMethod($method)
    {
        $method = strtoupper( (string) $method);

        if ( ! in_array($method, $this->allowedHttpMethods)) {

            throw new InvalidArgumentException("Invalid HTTP method: '{$method}'");
        }

        $this->setAttribute('http_method', $method);

        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;
    }