title: Having trouble getting content-encoding to show up in response header for get request
body: <p>I was trying to write a karate test that validated that a particular response header contained the Content-Encoding header field with a value of gzip. I tried on my api where both times the content-encoding field was missing from karate's response. Both of these endpoints returned the content-encoding field on postman and curl commands.</p>
  
  <p>I then tried to hit the postman-echo service to see if it was my api endpoint that karate was having issues with and it seems that it is not only my api. Could someone take a look at my code and see if I am doing something incorrectly to get the header field to show up in the response?</p>
  
  <pre><code>Feature: test getting Content-Encoding
  
    Background:
      * url 'https://postman-echo.com/gzip'
  
    Scenario:
      Given header Accept-Encoding = 'gzip'
      When method get
      Then status 200
      And match responseHeaders contains {'Content-Encoding':'#present'}
  </code></pre>
  
  <p>This is what karate request looks like</p>
  
  <pre><code>1 &gt; GET https://postman-echo.com/gzip
  1 &gt; Accept-Encoding: gzip
  1 &gt; Connection: Keep-Alive
  1 &gt; Host: postman-echo.com
  1 &gt; User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_252)
  </code></pre>
  
  <p>and the response looks like</p>
  
  <pre><code>1 &lt; 200
  1 &lt; Connection: keep-alive
  1 &lt; Content-Type: application/json; charset=utf-8
  1 &lt; Date: Fri, 08 May 2020 16:18:42 GMT
  1 &lt; ETag: W/"ef-7kclc8pzXTvQiPUaEOf6j95iFaE"
  1 &lt; Vary: Accept-Encoding
  1 &lt; set-cookie: sails.sid=s%3A6G_FShPRZH4V1G-tVDfUEEfMwQQmolo5.T2Cb37zqYA21FTyRyIGutVWQWo9ta4EWiod36%2FkM88I; Path=/; HttpOnly
  {
    "gzipped": true,
    "headers": {
      "x-forwarded-proto": "https",
      "x-forwarded-port": "443",
      "host": "postman-echo.com",
      "x-amzn-trace-id": "Root=1-5eb58662-c4aaeec26efd116ac0544a18",
      "accept-encoding": "gzip",
      "user-agent": "Apache-HttpClient/4.5.12 (Java/1.8.0_252)"
    },
    "method": "GET"
  }
  </code></pre>
  
  <p>The curl response header is</p>
  
  <pre><code>curl --location --request GET 'https://postman-echo.com/gzip' \
  &gt; --header 'Accept-Encoding: gzip' -I
  
  HTTP/2 200 
  date: Fri, 08 May 2020 16:21:53 GMT
  content-type: application/json; charset=utf-8
  content-length: 220
  content-encoding: gzip
  etag: W/"dc-BuD8DN1qXT7trYUQtZOuSvbq1pM"
  vary: Accept-Encoding
  set-cookie: sails.sid=s%3Aj86lznX3nK20fnEN4B3nbHESrfWqVJ3M.236VrsmQp7V%2F7%2BrvG%2FEtlc9yUVLTtylh1yyIAdQJSiY; Path=/; HttpOnly
  
  </code></pre>