public function withHost($host)
    {
        $pattern = new UriPattern();

        if ($pattern->matchHost($host)) {
            return $this->with('host', $this->normalize(strtolower($host)));
        }

        throw new \InvalidArgumentException("Invalid host '$host'");
    }