I am trying to do a post to a REST API over HTTPS and requires the script to pass a cert to the server. I am getting "exceptions.TypeError an integer is required" error and can't find the reason. I commenting out the lines of code, it is happening on the connection.request() line. Here is the problem code. Would love some help if possible.
head = {"Content-Type" : "application/x-www-form-urlencoded", "Accept" : "text/plain"} parameters = urlencode({"collection" : collection, "entryxml" : open (file,'r').read()}) try: connection = httplib.HTTPSConnection(host, port, key_file, cert_file) connection.request('POST', path, parameters, head) response = connection.getresponse() print response.status, response.reason except: print sys.exc_type, sys.exc_value connection.close() -- http://mail.python.org/mailman/listinfo/python-list