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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -