The following code throws an error "socket.gaierror: [Errno -2] Name or service not known".
import httplib, urllib
attrs = urllib.urlencode({"username":"admin", "password":"admin"})
conn = httplib.HTTPSConnection("https://x.x.x.x:8181")
conn.request("POST", "/login", attrs)
response = conn.getresponse()
print response.status, response.reason
I don't want to use urllib2 module. Could anybody help me?... How to save the state of that server?, so that next time i directly post the values for the uri.