Goutte 获取http response

$client = new Goutte\Client();
$crawler = $client->request('GET', 'http://symfony.com');

  获取http 响应code 和 http request 信息

$crawler = $this->client->request("GET", $cateUrl);
$code = $this->client->getInternalResponse()->getStatus();

  

猜你喜欢

转载自www.cnblogs.com/tl542475736/p/11008613.html