Function modify_request
Clone and modify a request with the given changes.
This method is useful for reducing the number of clones needed to mutate a message.
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.
Namespace: GuzzleHttp\Psr7
Deprecated: modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
Located at functions.php
Deprecated: modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
Located at functions.php
Parameters summary
|
$request |
Request to clone and modify. |
array |
$changes |
Changes to apply. |
Return value summary
|
RequestInterface |