title: How to properly format a POST API request with JSON?
body: <p>I have teaching myself how to develop Android applications and I recently started using the Volley library for networking. I have been able to send basic requests with it. I was experimenting with Pocket's API to see if my app could fetch the items. Their <a href="https://getpocket.com/developer/docs/authentication" rel="nofollow noreferrer">documentation page</a> mentions that I have to send a JSON request like so</p>
  
  <pre><code>POST /v3/oauth/request HTTP/1.1
  Host: getpocket.com
  Content-Type: application/json; charset=UTF-8
  X-Accept: application/json
  {"consumer_key":"1234-abcd1234abcd1234abcd1234",
  "redirect_uri":"pocketapp1234:authorizationFinished"}
  </code></pre>
  
  <p>So I made a JSONObject in my app, added the key <code>consumer_key</code> with the value of my consumer key, then added in the key <code>redirect_uri</code> with its respective value. I sent this JSONObject as a request to the required URL as a POST request using Volley. The response code I received was 403, which is caused by a bad consumer key. I have double-checked the consumer key, so the problem lies with my request. How should I go about making the JSON request? Do I have to add the extra data, like Content-Type? If so, how?</p>
  
  <p>If it is not too much, could you point me to a beginner-friendly resource on JSON, since I do not have much knowledge about web development?
  Thank you.</p>