title: Get Content Type of Request
body: <p>To find the incoming content type, <a href="http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-headers">docs say</a>:</p>
  
  <pre><code> request.headers["Content-Type"] # =&gt; "text/plain"
  </code></pre>
  
  <p>But I found by trial-and-error, that doesn't work, but this does:</p>
  
  <pre><code> request.headers["CONTENT_TYPE"]=='application/json'
  </code></pre>
  
  <p>So what's the most robust+portable way to do it?</p>