【发布时间】:2015-09-22 15:05:27
【问题描述】:
我使用带有 API REST 的 GuzzleHttp。我的参数在
$url_complete = 'http://apirest.com/?'.$params;
$request = $client->post(
$url_complete,
);
当我搜索解决方案时,我只得到 EntityBody 对象的解决方案 (http://guzzle3.readthedocs.org/http-client/entity-bodies.html)。但是 EntityBody 是 API 的响应。我不需要读取压缩数据,我必须发送它。
您知道使用 GuzzleHttp 将压缩(使用 gzip)数据发送到 API REST 的方法吗?
【问题讨论】:
-
您是否仅限于使用 Guzzle 3 或者您是否有能力升级到 Guzzle 6?
-
是的,由于系统管理员的限制,我不能使用 PHP 5.5。