httplib

This module implements the client side of the Hypertext Transfer Protocol (HTTP) used in web applications. Both the HTTP/1.0 and HTTP/1.1 protocols are supported. In addition, if Python is configured with OpenSSL support, connections can be made using secure sockets. This module is not normally used directly; instead, you should consider using urllib or urllib2. However, HTTP is such an important protocol, this module is covered in some detail in this section. For more details about HTTP, consult RFC 2616 (HTTP/1.1) and RFC 1945 (HTTP/1.0).

The HTTP protocol is a simple text-based protocol that works as follows:

1.
A client makes a connection to a web server and sends a request header of the following form:
 GET /document.html HTTP/1.0 ...

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.