I want to detect wheter the http or https service is ok, in python.
Now I have known is to use httplib module.
Use the httplib.HTTPConnection to get the status, and check whether it is ‘OK'(code is 200), and the same to https by using HTTPSConnection
but I don’t know whether this way is right?or there is another more good way?
I have a script that does this kind of check, I use
urllib2for that, whatever the protocol (http or https):