Chapter 3. HTTP Messages

If HTTP is the Internet’s courier, HTTP messages are the packages it uses to move things around. In Chapter 1, we showed how HTTP programs send each other messages to get work done. This chapter tells you all about HTTP messages—how to create them and how to understand them. After reading this chapter, you’ll know most of what you need to know to write your own HTTP applications. In particular, you’ll understand:

  • How messages flow

  • The three parts of HTTP messages (start line, headers, and entity body)

  • The differences between request and response messages

  • The various functions (methods) that request messages support

  • The various status codes that are returned with response messages

  • What the various HTTP headers do

Get HTTP: The Definitive Guide 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.