Sobes.tech
Middle

Name the main types of HTTP methods (verbs) used in REST API

sobes.tech AI

Answer from AI

Main HTTP methods (verbs) used in REST API:

  • GET — retrieve a resource or list of resources. Safe and idempotent.
  • POST — create a new resource or perform an operation. Not idempotent.
  • PUT — complete update of a resource. Idempotent.
  • PATCH — partial update of a resource. Usually not idempotent.
  • DELETE — delete a resource. Idempotent.
  • HEAD — get resource headers without the body.
  • OPTIONS — get supported methods for a resource.

These methods allow building standardized and predictable RESTful services.