O'Reilly logo

HTTP Pocket Reference by Clinton Wong

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Client Methods

A client request method is a command or request that a web client issues to a server. You can think of the method as the declaration of the client's intentions. There are exceptions, of course, but here are some generalizations:

  • You can think of a GET request as meaning that you just want to retrieve a resource on the server. This resource could be the contents of a static file or invoke a program that generates data.

  • A HEAD request means that you just want some information about the document, but don't need the document itself.

  • A POST request says that you're providing some information of your own (generally used for fill-in forms). This typically changes the state of the server in some way. For example, it could create a record in a database.

  • PUT is used to provide a new or replacement document to be stored on the server.

  • DELETE is used to remove a document on the server.

  • TRACE asks that proxies declare themselves in the headers, so the client can learn the path that the document took (and thus determine where something might have been garbled or lost). This is used for protocol debugging purposes.

  • OPTIONS is used when the client wants to know what other methods can be used for that document (or for the server at large).

  • CONNECT is used when a client needs to talk to a HTTPS server through a proxy server.

Other HTTP methods that you may see (LINK, UNLINK, and PATCH) are less clearly defined.

GET: Retrieve a Document

The GET method requests a document from a specific location ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required