title: How to translate curl POST to requests POST in Python?
body: <p>I have curl command which I need to transfer to requests POST in Python</p>
  
  <pre><code>curl -X POST -H "Content-Type: application/json" -d '{"val1": -1000, "val2": 15, "val3": "20000", "val4": "22"}'
  http://some-site:6000?t=1234567890
  </code></pre>
  
  <p>I tried with:</p>
  
  <pre><code>payload = {'val1': val1, 'val2': val2, 'val3': val3, 'val4': val4}
  r = requests.post(url, params=payload)
  </code></pre>
  
  <p><code>r.url</code> returns:</p>
  
  <pre><code> http://some-site:6000?t=1234567890&amp;val1=-1000&amp;val2=15&amp;val3=20000&amp;val4=22
  </code></pre>
  
  <p>However, I get <code>val1 is not defined</code> response from server. I can see in curl command that val1 and val2 are int type. Can I send with <code>requests</code> ints and strings separately or this is not the reason for this error?</p>