Set the URL of the request
Warning: Calling this method will modify headers, rewrite the query string object, and set other data associated with the request.
string $url|Url Full URL to set including query string:
Overrides RequestInterface::setUrl
public function setUrl($url) {
if ($url instanceof Url) {
$this->url = $url;
}
else {
$this->url = Url::factory($url);
}
// Update the port and host header
$this
->setPort($this->url
->getPort());
if ($this->url
->getUsername() || $this->url
->getPassword()) {
$this
->setAuth($this->url
->getUsername(), $this->url
->getPassword());
// Remove the auth info from the URL
$this->url
->setUsername(null);
$this->url
->setPassword(null);
}
return $this;
}