public function __toString()
{
$path = $this->startsWith($this->path, '/') ? substr($this->path, 1) : $this->path;
$port = $this->port === 80 ? '' : ":{$this->port}";
$queryString = is_null($this->query) ? '' : "?{$this->query}";
return "{$this->scheme}://{$this->host}{$port}/{$path}{$queryString}";
}