headers = {'Content-type': 'application/x-www-form-urlencoded', 'Accept':
    'text/plain'}
conn = httplib.HTTPConnection('example.com:80')
conn.request('POST', '/some/path/to/site', params, headers)
response = conn.getresponse()
print(response.status, response.reason)
Convert a curl POST request to Python only using standard library