|
|
|
__init__(self,
reqsocket,
handlers=None)
Initialize the HTTP server, uses the socket |reqsocket| and uses
|handlers| (a dictionary methodname -> handlerfunction) as
handlers to methods. |
source code
|
|
|
|
|
send_response_header(self,
httpversion=' HTTP/1.1 ' ,
status=200,
status_string=None)
Send the first line with the response of the request |httpversion|
is the version of the http response |status| the reponse status
|status_string| a human readable status |
source code
|
|
|
|
|
|
|
send_page(self,
stringdata,
headers=None,
status=200)
Send a page with data |stringdata|, headers |headers|, and the
status |status| (default OK: 200) |
source code
|
|
|
resolve(self)
Resolve a request using handlers, if there is no handler, it
responses with 405 error |
source code
|
|
|
|
|
|
Inherited from HTTPBase :
__getitem__ ,
close ,
close_socket ,
get_content ,
get_httpversion ,
get_method ,
get_uri ,
put_headers ,
read_headers ,
set_socket
|