Package shttp :: Module sHTTP :: Class HTTPClient
[hide private]
[frames] | no frames]

Class HTTPClient

source code

HTTPBase --+
           |
          HTTPClient

The HTTP Client

Instance Methods [hide private]
 
set_socket(self, conn=None, usingssl=True)
Change the socket, to manage connetion errors and https connections
source code
 
__del__(self) source code
 
__init__(self, address, defaultheaders=None, sockettimeout=None, usingssl=True)
Initialize the HTTP Client, it uses the |address| to connect
source code
 
request_error(self, string)
Manage the request error as bas response
source code
 
send_request(self, uri, msg='', version='HTTP/1.1', method='POST', headers=None)
Send a request to the server
source code
 
__send_request(self, uri, msg, version, method, headers)
The real send_request, don't use if you do not know what are you doing.
source code
 
get_response_status(self) source code
 
get_response_reason(self) source code
 
get_content(self, just_file_pointer=True, get_raw_data=True)
Return the content of the document (a POST in the server, a response int the client)
source code

Inherited from HTTPBase: __getitem__, close, close_socket, get_httpversion, get_method, get_uri, header_error, put_headers, read_headers

Inherited from HTTPBase (private): _read, _readline, _write

Method Details [hide private]

set_socket(self, conn=None, usingssl=True)

source code 
Change the socket, to manage connetion errors and https connections
Overrides: HTTPBase.set_socket

__del__(self)
(Destructor)

source code 
Overrides: HTTPBase.__del__

__init__(self, address, defaultheaders=None, sockettimeout=None, usingssl=True)
(Constructor)

source code 
Initialize the HTTP Client, it uses the |address| to connect
Overrides: HTTPBase.__init__

request_error(self, string)

source code 
Manage the request error as bas response
Overrides: HTTPBase.request_error

__send_request(self, uri, msg, version, method, headers)

source code 
The real send_request, don't use if you do not know what are you doing. This is used only by persistant connections

get_content(self, just_file_pointer=True, get_raw_data=True)

source code 
Return the content of the document (a POST in the server, a response int the client)
Overrides: HTTPBase.get_content
(inherited documentation)