title: Incoming request headers are empty in Codeigniter4
body: <p>Im developing a shopify public application using <a href="https://github.com/Shopify/shopify-php-api" rel="nofollow noreferrer">Official Shopify Php API Library</a> and <a href="https://codeigniter4.github.io/" rel="nofollow noreferrer">Codeigniter4</a>. I registered for Product update Webhook in shopify which send response to one of my codeigniter controller.</p>
  <p>The problem is after processing the request I see empty header values as follows:</p>
  <blockquote>
  <p>{&quot;Host&quot;:{},&quot;User-Agent&quot;:{},&quot;Content-Length&quot;:{},&quot;Accept&quot;:{},&quot;Accept-Encoding&quot;:{},&quot;Content-Type&quot;:{},&quot;X-Forwarded-For&quot;:{},&quot;X-Forwarded-Proto&quot;:{},&quot;X-Shopify-Api-Version&quot;:{},&quot;X-Shopify-Hmac-Sha256&quot;:{},&quot;X-Shopify-Product-Id&quot;:{},&quot;X-Shopify-Shop-Domain&quot;:{},&quot;X-Shopify-Topic&quot;:{},&quot;X-Shopify-Webhook-Id&quot;:{}}</p>
  </blockquote>
  <p>the controller is:</p>
  <pre><code>class ProdHook Extends Controller{
      public function index(){
         $headers = $this-&gt;request-&gt;headers();
         print_r($headers);
      }
   }
  </code></pre>
  <p>The <code>$this-&gt;trequest-&gt;headers()</code> is returns empty header values. But when I replace this with native php function <code>getallheaders()</code>, I can get all header values without any issues. The output of <code>getallheaders()</code> is :</p>
  <blockquote>
  <p>{&quot;Host&quot;:&quot;e703.ngrok.io&quot;,&quot;User-Agent&quot;:&quot;Faraday v1.8.0&quot;,&quot;Content-Length&quot;:&quot;2132&quot;,&quot;Accept&quot;:&quot;<em>/</em>&quot;,&quot;Accept-Encoding&quot;:&quot;gzip;q=1.0,deflate;q=0.6,identity;q=0.3&quot;,&quot;Content-Type&quot;:&quot;application/json&quot;,&quot;X-Forwarded-For&quot;:&quot;34.xx.xxx.11&quot;,&quot;X-Forwarded-Proto&quot;:&quot;https&quot;,&quot;X-Shopify-Api-Version&quot;:&quot;2021-10&quot;,&quot;X-Shopify-Hmac-Sha256&quot;:&quot;xxxxxxxx&quot;,&quot;X-Shopify-Product-Id&quot;:&quot;78803xxxxxx922&quot;,&quot;X-Shopify-Shop-Domain&quot;:&quot;xxxxx.myshopify.com&quot;,&quot;X-Shopify-Topic&quot;:&quot;products/update&quot;,&quot;X-Shopify-Webhook-Id&quot;:&quot;uasdhxxxxx-b30c-fdc6e6865609&quot;}</p>
  </blockquote>
  <p>I don't how to fix this issue. I want to stick with native codeigniter4. Thanks in advance.</p>