def putrequest(self, method, uri):
protocol = unicode(self.protocol + '<STR_LIT>')<EOL>url = protocol + self.host + unicode(uri)<EOL>self._httprequest.set_timeout(self.timeout)<EOL>self._httprequest.open(unicode(method), url)<EOL>if self.cert_file is not None:<EOL><INDENT>self._httprequest.set_client_certificate(unicode(self.cert_file))<EOL><DEDENT>
Connects to host and sends the request.