public function withMethod($method)
    {
        $method = strtoupper($method);
        $methods = ['GET', 'POST', 'PATCH', 'PUT', 'DELETE', 'HEAD'];
        if (! in_array($method, $methods)) {
            throw new \InvalidArgumentException('Invalid Method');
        }
        $new = clone $this;
        $new->method = $method;
        return $new;
    }