public function getRequestHeaders() { $headers = Arrays::filterByKeys($_SERVER, Functions::startsWith('HTTP_')); return Arrays::mapKeys($headers, function ($key) { return str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5))))); }); }