我使用的是guese5.3,看起来它正在更改我的数组参数,删除索引。
这是我的要求:
$request = $client->createRequest(
'GET',
'http://myserver.com/file.php?param=1&arrayparam[10]=2015&arrayparam[18]=2016'
);
$response = $client->send($request);
使用订阅服务器\历史记录,请求如下:
获取/file.php?param=1&arrayparam=2015&arrayparam=2016 HTTP/1.1 主机: myserver.com
有人能帮上忙吗?
发布于 2016-05-31 13:59:18
搜索github问题时,我发现您可以使用不同的聚合方法。因此,我将代码更改为使用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);
希望能帮上忙!
https://stackoverflow.com/questions/37547235
复制相似问题