Package ndg :: Package httpsclient :: Module https :: Class HTTPSConnection
[hide private]

Class HTTPSConnection

source code


This class allows communication via SSL using PyOpenSSL. It is based on httplib.HTTPSConnection, modified to use PyOpenSSL.

Note: This uses the constructor inherited from HTTPConnection to allow it to be used with httplib and HTTPSContextHandler. To use the class directly with an SSL context set ssl_context after construction.

Nested Classes [hide private]

Inherited from httplib.HTTPConnection: response_class

Instance Methods [hide private]
 
__init__(self, host, port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, ssl_context=None) source code
 
connect(self)
Create SSL socket and connect to peer
source code
 
close(self)
Close socket and shut down SSL connection
source code

Inherited from httplib.HTTPConnection: endheaders, getresponse, putheader, putrequest, request, send, set_debuglevel, set_tunnel

Inherited from httplib.HTTPConnection (private): _output, _send_output, _send_request, _set_content_length, _set_hostport, _tunnel

Class Variables [hide private]
int default_port = 443
default port for this class (443)
int default_ssl_method = 3
default SSL method used if no SSL context is explicitly set - defaults to version 2/3.

Inherited from httplib.HTTPConnection: auto_open, debuglevel, strict

Inherited from httplib.HTTPConnection (private): _http_vsn, _http_vsn_str

Method Details [hide private]

__init__(self, host, port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, ssl_context=None)
(Constructor)

source code 
Overrides: httplib.HTTPConnection.__init__

connect(self)

source code 

Create SSL socket and connect to peer

Overrides: httplib.HTTPConnection.connect

close(self)

source code 

Close socket and shut down SSL connection

Overrides: httplib.HTTPConnection.close