Request methods

The client specifies the intended interaction with well-defined semantic HTTP methods, such as GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS. The following are the rules that an API designer should take into account when planning their design:

  • Don't tunnel to other requests with the GET and POST methods
  • Use the GET method to retrieve a representation of a resource
  • Use the HEAD method to retrieve response headers
  • Use the PUT method to update and insert a stored resource
  • Use the PUT method to update mutable resources
  • Use the POST method to create a new resource in a collection
  • Use the POST method for controller's execution
  • Use the DELETE method to remove a resource from its parent
  • Use the OPTIONS method to retrieve metadata
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.157.142