How to make curl post request from python
<p>I am trying to make a post request using curl in python but the below script throws error</p>

<pre><code>import os

first_name1 = "raj"
last_name1 = "kiran"
full_name = "raj kiran"
headline = "astd"
location1 = "USA"
current_company1 = "ss"

curl_req = 'curl -X POST -H "Content-Type: application/json" -d '{"first_name":"{0}","last_name":"{1}","current_company":"{2}","title":"{3}","campus":"","location":"{4}","display_name":"{5}","find_personal_email":"true"}' http://localhost:8090'.format(first_name1,last_name1,current_company1,headline,location1,full_name)

os.popen(curl_req)
</code></pre>

<p>Error:</p>

<pre><code>SyntaxError: invalid syntax
</code></pre>

<p>How to make above program work?</p>