public function addMethod($method)
    {
        if (!is_string($method)) {
            throw new InvalidArgumentException(
                sprintf(
                    'Unsupported HTTP method; must be a string, received %s',
                    (is_object($method) ? get_class($method) : gettype($method))
                )
            );
        }

        // According to RFC, methods are defined in uppercase (See RFC 7231)
        $method = strtoupper($method);

        $validHttpMethods = [
            'CONNECT',
            'DELETE',
            'GET',
            'HEAD',
            'OPTIONS',
            'PATCH',
            'POST',
            'PUT',
            'TRACE',
        ];

        if (!in_array($method, $validHttpMethods)) {
            throw new InvalidArgumentException(sprintf(
                'Unsupported HTTP method; must be one of "%s", received "%s"',
                implode('","', $validHttpMethods),
                $method
            ));
        }

        $this->methods[] = $method;

        return $this;
    }