title: Print out only headers in Rails request
body: <p>I know how to access a header in Rails</p>
  
  <pre><code>request.headers["HEADER_NAME"]
  </code></pre>
  
  <p>However, I want to get all headers passed by a browser. I see that I can enumerate it</p>
  
  <pre><code>request.headers.each { |header| ... }
  </code></pre>
  
  <p>However, this will spit out both headers and other environment variables. Is there a way to get only headers?</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>My problem isn't interation. My problem is distinguising between environment variables and headers. Both of them will be reported while interation using each or keys. </p>