title: How can I post http request instead of using cURL?
body: <p>I am using <a href="https://github.com/FooSoft/anki-connect" rel="nofollow noreferrer">anki-connect</a> to communicate with <a href="https://apps.ankiweb.net/" rel="nofollow noreferrer">Anki</a>, a spaced repetition software.<br>
  In readme.md, it uses following command to get deck name.</p>
  
  <pre><code>curl localhost:8765 -X POST -d "{\"action\": \"deckNames\", \"version\": 5}"
  </code></pre>
  
  <p>It works right in my Windows system.<br>
  How can I use python instead of cURL?<br>
   I've tried this but get no luck.  </p>
  
  <pre><code>import requests  
  r = requests.post("http://127.0.0.1:8765", data={'action': 'guiAddCards', 'version': 5})
  print(r.text)
  </code></pre>