http.server.BaseHTTPRequestHandler.address_string()

address_string() Returns the client address. Changed in version 3.3: Previously, a name lookup was performed. To avoid name resolution delays, it now always returns the IP address.

http.server.BaseHTTPRequestHandler.close_connection

close_connection Boolean that should be set before handle_one_request() returns, indicating if another request may be expected, or if the connection should be shut down.

http.server.BaseHTTPRequestHandler.client_address

client_address Contains a tuple of the form (host, port) referring to the client’s address.

http.server.BaseHTTPRequestHandler

class http.server.BaseHTTPRequestHandler(request, client_address, server) This class is used to handle the HTTP requests that arrive at the server. By itself, it cannot respond to any actual HTTP requests; it must be subclassed to handle each request method (e.g. GET or POST). BaseHTTPRequestHandler provides a number of class and instance variables, and methods for use by subclasses. The handler will parse the request and the headers, then call a method specific to the request type. The meth

http.server.BaseHTTPRequestHandler.command

command Contains the command (request type). For example, 'GET'.

http.cookies.Morsel.set()

Morsel.set(key, value, coded_value) Set the key, value and coded_value attributes. Deprecated since version 3.5: The undocumented LegalChars parameter is ignored and will be removed in a future version.

http.cookies.SimpleCookie

class http.cookies.SimpleCookie([input]) This class derives from BaseCookie and overrides value_decode() and value_encode() to be the identity and str() respectively.

http.cookies.Morsel.update()

Morsel.update(values) Update the values in the Morsel dictionary with the values in the dictionary values. Raise an error if any of the keys in the values dict is not a valid RFC 2109 attribute. Changed in version 3.5: an error is raised for invalid keys.

http.cookies.Morsel.setdefault()

Morsel.setdefault(key, value=None) Raise an error if key is not a valid RFC 2109 attribute, otherwise behave the same as dict.setdefault().

http.HTTPStatus

class http.HTTPStatus New in version 3.5. A subclass of enum.IntEnum that defines a set of HTTP status codes, reason phrases and long descriptions written in English. Usage: >>> from http import HTTPStatus >>> HTTPStatus.OK <HTTPStatus.OK: 200> >>> HTTPStatus.OK == 200 True >>> http.HTTPStatus.OK.value 200 >>> HTTPStatus.OK.phrase 'OK' >>> HTTPStatus.OK.description 'Request fulfilled, document follows' >>> list(HTTPStatus