CodeIgniter Forums
How to fix CodeIgniter headers? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: How to fix CodeIgniter headers? (/showthread.php?tid=86849)



How to fix CodeIgniter headers? - KamaalJeim - 02-20-2023

I'm having trouble using request headers in my CodeIgniter custom Controller. The function $request->getHeader('any-header') returns an empty object and using $request->headers() results in an error. How can I fix this issue and use the CodeIgniter functions instead of getallheaders()?


RE: How to fix CodeIgniter headers? - kenjis - 02-20-2023

What is an empty object?
It should return a Header object.