HTTP METHODS

Photo by Caspar Camille Rubin on Unsplash

OPTIONS

It allows the client to determine the options or requirements associated with a resource — rather, the capabilities of the server.

GET

It represents a retrieval of information from a Request-URI. The response of a GET request is cacheable — only if the caching standards are met.

HEAD

The HEAD method asks for a response identical with the GET method but without the response body — if it has a body, it should be ignored.

POST

It sends data to the server. The type of the body sent is indicated by the Content-Type header.

  1. Annotation of existing resources
  2. Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles
  3. Providing a block of data, such as the result of submitting a form, to a data-handling process
  4. Providing a block of data, such as the result of submitting a form, to a data-handling process

PUT

It creates a new resource or updates an existing one with the request payload sent.

DELETE

It deletes the specified resource. It may be overriden by human intervention or by other means on the origin server.

TRACE

It performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.

PATCH

It applies partial modifications to a resource. It is considered a set of instructions on how to update a resource rather than PUT which is a complete representation of the resource.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brian Kitunda

Brian Kitunda

Computer Science student Maseno University, Kenya