Function modify_request
Clone and modify a request with the given changes.
The changes can be one of: - method: (string) Changes the HTTP method. - set_headers: (array) Sets the given headers. - remove_headers: (array) Remove the given headers. - body: (mixed) Sets the given body. - uri: (UriInterface) Set the URI. - query: (string) Set the query string value of the URI. - version: (string) Set the protocol version.
|
$request |
Request to clone and modify. |
array |
$changes |
Changes to apply. |
|
RequestInterface |