Skip to content

Commit 920724c

Browse files
leektaylorotwell
andauthored
[12.x] HTTP Client: add mergeUrlParameters() to combine URL parameters without overwriting (#57282)
* Implement mergeUrlParameters method Add method to merge URL parameters into existing map. * Update PendingRequest.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 887a11c commit 920724c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Http/Client/PendingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public function withUserAgent($userAgent)
528528
public function withUrlParameters(array $parameters = [])
529529
{
530530
return tap($this, function () use ($parameters) {
531-
$this->urlParameters = $parameters;
531+
$this->urlParameters = array_merge($this->urlParameters, $parameters);
532532
});
533533
}
534534

0 commit comments

Comments
 (0)