title: Python requests library: data vs json named arguments with requests.post
body: <p>According to the relevant portion of the <a href="http://docs.python-requests.org/en/master/user/quickstart/#more-complicated-post-requests" rel="noreferrer">requests library documentation</a>, the primary method to pass a dictionary to the post method is as follows:</p>
  
  <pre><code>r = requests.post(url, data = {"example": "request"})
  </code></pre>
  
  <p>Afterwards, the authors demonstrate an example of passing a JSON string directly to the Github API. Then the authors suggest that instead of encoding the dictionary as a JSON string and passing it via <code>data</code>, you can simply use the named parameter <code>json</code> to pass a dictionary in as follows.</p>
  
  <pre><code>r= requests.post(url, json = {"example": "request"})
  </code></pre>
  
  <p>When would you use <code>json</code> instead of <code>data</code>? Is this redundancy idiosyncratic or intentional?</p>