title: Faraday POST request to getpocket API
body: <p>I'm trying to set up OAuth for users of my Rails app to GetPocket (<a href="http://getpocket.com" rel="nofollow">http://getpocket.com</a>).</p>
  
  <p>On Step 2 of the Pocket Authentication docs (<a href="http://getpocket.com/developer/docs/authentication" rel="nofollow">http://getpocket.com/developer/docs/authentication</a>), I'm having trouble constructing the exact Faraday request.</p>
  
  <p>The following request works:</p>
  
  <pre><code>Faraday.post('https://getpocket.com/v3/oauth/request', {consumer_key: 'key', redirect_uri: 'localhost:3000'})
  </code></pre>
  
  <p>But I'd like the response to be in JSON. I'd like to be able to add a "Content-Type":"application/json" header to the request, but all my attempts don't seem to work.</p>
  
  <p>Interestingly, when I do the following, the request fails (it returns a 200 but doesn't return a request token, just a whole HTML page):</p>
  
  <pre><code>conn = Faraday.new('https://getpocket.com/v3/oauth/request')
  conn.post('/', {consumer_key: 'key', redirect_uri: 'localhost:3000'})
  </code></pre>
  
  <p>How do I get my Faraday POST request to the Pocket API to return results in JSON?</p>