dimanche 7 mars 2021

getHeader from getInternalResponse in symfony panther always return an empty array

By using symfony panther, I sent a request and I wanted to get the response. I was able to get the body and the status code but for the header I just got an empty array.

$client = Client::createChromeClient();
$client->request('GET', 'https://google.com');
$client->getInternalResponse()->getHeaders(); // returned empty array!!!

Aucun commentaire:

Enregistrer un commentaire