This is my function to get the headers.
function authenticate(\Slim\Route $route ) {
// Getting request headers
$app = \Slim\Slim::getInstance();
$headers = $app->request()->headers()->all();
$response = array();
die(var_export($headers));
}
And what im getting on post man is
array (
Authorization' => '',
'Host' => 'localhost',
'Connection' => 'keep-alive',
'Content-Length' => '0',
'Cache-Control' => 'no-cache',
'Origin' => 'chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop',
'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',
'Postman-Token' => 'bd5e445c-bba1-b7fc-29e6-17724a83dcbd',
'Accept' => '*/*',
'Accept-Encoding' => 'gzip, deflate',
'Accept-Language' => 'en-US,en;q=0.8',
)