The protocols of yore tended to be dense, binary, and decipherable only by Boolean machine logic. But the workhorse protocol of the World Wide Web, named the Hypertext Transfer Protocol (HTTP), is instead based on friendly, mostly-human-readable text. There is probably no better way to start this chapter than to show you what an actual request and response looks like; that way, you will already know the layout of a whole request as we start digging into each of its features.
Consider what happens when you ask the
urllib2 Python Standard Library to open this URL, which is the RFC that defines the HTTP protocol itself:
The library will connect to the IETF web site, and send it an HTTP request that looks ...