title: Specifying Content Type in rspec
body: <p>I'm trying to build an rspec test that sends JSON (or XML) via POST. However, I can't seem to actually get it working:</p>
  
  <pre><code>    json = {.... data ....}.to_json
      post '/model1.json',json,{'CONTENT_TYPE'=&gt;'application/json'}
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>    json = {.... data ....}.to_json
      post '/model1.json',json,{'Content-Type'=&gt;'application/json'}
  </code></pre>
  
  <p>any ideas? THANKS!</p>