0
我使用https://github.com/FriendsOfPHP/Goutte來刮頁面。沒有probs那裏。Goutte/GuzzleHTTP獲取響應主體的內容長度/大小
我想從客戶端響應對象中獲取Content-Length
,但看不到我能做到這一點。
我使用https://github.com/FriendsOfPHP/Goutte來刮頁面。沒有probs那裏。Goutte/GuzzleHTTP獲取響應主體的內容長度/大小
我想從客戶端響應對象中獲取Content-Length
,但看不到我能做到這一點。
點擊查看文檔...使用$response = $client->getInternalResponse()
可獲得Symfony\Component\BrowserKit\Response
,其中$response->getHeader('Content-Length')
可用。 :-)