php - How to get header values in laravel testing -
this how response in test case
$response = $this->call('post','/api/auth/login',['username'=>'xx','password'=>'xxx'], [/* cookies */], [/* files */], ['http_clientsecret' => 'xxxx']);
then can response content this
$response->getcontents()
i want know how response header data ?
do like:
$response->headers->get('content-type');
or whatever need. dd($response->headers);
might useful if want see in response headers.
$this->call()
returns response extending symfony's response , headers
object responseheaderbag
has following methods.
Comments
Post a Comment