def perform(self):
if self.use_https:<EOL><INDENT>conn = client.HTTPSConnection(self.host, self.port)<EOL><DEDENT>else:<EOL><INDENT>conn = client.HTTPConnection(self.host, self.port)<EOL><DEDENT>conn.request(self.method, self.uri)<EOL>response = conn.getresponse()<EOL>conn.close()<EOL>return bool(response.status >= <NUM_LIT:200> and response.status < <NUM_LIT>)<EOL>
Performs a simple HTTP request against the configured url and returns
true if the response has a 2xx code.

The url can be configured to use https via the "https" boolean flag
in the config, as well as a custom HTTP method via the "method" key.

The default is to not use https and the GET method.