【问题标题】:Goutte / GuzzleHTTP Get the Content-Length / Size of the response bodyGoutte / GuzzleHTTP 获取响应正文的 Content-Length / Size
【发布时间】:2016-01-13 20:01:25
【问题描述】:

我正在使用https://github.com/FriendsOfPHP/Goutte 来抓取页面。没有问题。

我正在尝试从客户端响应对象中获取 Content-Length,但看不到我该怎么做。

【问题讨论】:

    标签: php guzzle content-length goutte


    【解决方案1】:

    单击文档...使用$response = $client->getInternalResponse() 获取Symfony\Component\BrowserKit\Response,作为$response->getHeader('Content-Length') 可用。 :-)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-13
      • 1970-01-01
      • 2014-07-17
      • 2015-04-13
      • 1970-01-01
      • 2011-11-06
      • 1970-01-01
      相关资源
      最近更新 更多