headers = {'Content-type': 'application/x-www-form-urlencoded', 'Accept':
    'text/plain'}
conn = httplib.HTTPConnection('musi-cal.mojam.com:80')
conn.request('POST', '/cgi-bin/query', params, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
conn.close()
How do I use Python's httplib to send a POST to a URL, with a dictionary of parameters?