Reputation: 21
I'm using Guzzle 5.3, and looks like it is changing my array parameters, removing indexes.
This is my request:
$request = $client->createRequest(
'GET',
'http://myserver.com/file.php?param=1&arrayparam[10]=2015&arrayparam[18]=2016'
);
$response = $client->send($request);
Using the Subscriber\History, the Request is going:
GET /file.php?param=1&arrayparam=2015&arrayparam=2016 HTTP/1.1
Host: myserver.com
Can anyone help on this?
Upvotes: 1
Views: 393
Reputation: 21
Searching on github issues, I found that you can use different aggregate methods. So I changed my code to use phpAggregator():
$request = $client->createRequest(
'GET',
'http://myserver.com/file.php?param=1&arrayparam[10]=2015&arrayparam[18]=2016'
);
$request->getQuery()->setAggregator(Query::phpAggregator());
$response = $client->send($request);
Hope it helps!
Upvotes: 1