BaseHTTPServer

The BaseHTTPServer module defines two base classes used to implement standalone HTTP servers. This module is used by a number of other modules, including SimpleHTTPServer, CGIHTTPServer, and SimpleXMLRPCServer.

						HTTPServer(server_address, request_handler)

Creates a new HTTPServer object. server_address is a tuple of the form (host, port) on which the server will listen. request_handler is a factory function that is used to create instances of BaseHTTPRequestHandler objects, described later. These handler objects are used to handle the details of each connection that is made to the server.

The HTTPServer class is derived from SocketServer.TCPServer and supports the same methods. In particular, the following functions are most relevant: ...

Get Python: Essential Reference, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.