Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Http/IRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,11 @@ function getRemoteHost();
*/
function getRawBody();


/**
* Returns new IRequest instance with modified URL.
* @return IRequest
*/
// public function withUrl(UrlScript $url);

}
13 changes: 13 additions & 0 deletions src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,19 @@ public function getRawBody()
}


/**
* Returns new IRequest instance with modified URL.
* @return IRequest
*/
public function withUrl(UrlScript $url)
{
return new static(
$url, NULL, $this->post, $this->files, $this->cookies, $this->headers, $this->method,
$this->remoteAddress, $this->remoteHost, $this->rawBodyCallback
);
}


/**
* Parse Accept-Language header and returns preferred language.
* @param string[] supported languages
Expand Down