What other types of HTTP requests are there?

Question

In the context of this lesson, what other types of HTTP requests are there?

Answer

In addition to the GET and POST requests which are the most commonly used, there are several other types of requests that may be used in certain situations:

A PATCH request, which can be used to modify some resource.

A PUT request, which can create a new resource or replace an existing one.

A DELETE request, which is used to delete a specified resource.

There is also a HEAD request, which asks for a similar response as the GET but without the body of the request.

A CONNECT request, which is used to create a two-way communication with the requested resource.

An OPTIONS request, which is used to get the communication options from the target resource.

Finally, there is a TRACE request, which is used to perform a test along the path to the target resource using a loop-back message.

4 Likes

Those are all of the requests that I am aware of. Mostly, developers will use GET and POST. I am using GET requests in a program that pulls in API data.

2 Likes