Home > OS >  Purpose of the different HTTP-Methods?
Purpose of the different HTTP-Methods?

Time:09-25

What's the purpose of the HTTP-methods GET, POST, PUT, DELETE, HEAD etc.

Is it just a convention to indicate, what I'm intending to do? Or is it, that certain HTTP-features are only available if I use a specific method?

CodePudding user response:

GET requests:

  • GET requests can be cached
  • GET requests remain in the browser history
  • GET requests can be bookmarked
  • GET requests should never be used when dealing with sensitive data
  • GET requests have length restrictions
  • GET requests are only used to request data (not modify)

POST requests:

  • POST requests are never cached

  • POST requests do not remain in the browser history

  • POST requests cannot be bookmarked

  • POST requests have no restrictions on data length

now I hope you understood the difference between GET and POST. In similar ways, every method has different purpose.

  • Related