Overrides RequestInterface::withUri
public function withUri(UriInterface $uri, $preserveHost = false) : RequestInterface { if ($uri === $this->uri) { return $this; } $new = clone $this; $new->uri = $uri; if (!$preserveHost || !isset($this->headerNames['host'])) { $new->updateHostFromUri(); } return $new; }