Requests

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

A client (usually a web browser, or another web application) makes requests to a server (a web application. These requests could be for several different purposes, and HTTP gives each of these purposes a special name. These are usually referred to as HTTP request methods. The good news is that there are only 5 that are commonly used in web applications (and only a few more in total) - here they are:

  • GET - requests content, should only retrieve data
  • POST - used when submitting something to the server, usually results in a change made on the server
  • PUT - replaces all current representations of a resource with the data attached to the request
  • PATCH - used to apply partial modifications to a resource
  • DELETE - deletes a specified resource

When a request is made with these HTTP request methods, there is usually some data included along with the request. When you submit a form on a webpage, you input data into fields, and then press a submit button. This would usually result in the web browser making a POST request to the server, and including your data in the request. The server does something with your data, then sends a response, usually another webpage that tells you that your data was successfully submitted (or maybe that it failed!)