If that’s the response, what’s in the request?

The first thing you’ll find is an HTTP method name. These aren’t Java methods, but the idea is similar. The method name tells the server the kind of request that’s being made, and how the rest of the message will be formatted. The HTTP protocol has several methods, but the ones you’ll use most often are GET and POST.

image with no caption
image with no caption

Get Head First Servlets and JSP, 2nd 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.