Skip to main content

ASP.NET Web (REST) API Best Practices - HTTP Verb

In our ASP.NET Web (REST) API Best Practices series, today we are going to talk about the HTTP Verb like POST, GET, PUT etc.

Every verbs have specific meaning for it's associate requests. for ex.
  • GET
    • Use when fetching records or data from APIs.
  • POST
    • Use when adding records or data in APIs
  • PUT
    • Use when updating records or data in APIs
  • DELETE
    • Use when deleting records or data in APIs
We covers CRUD scenario with Web APIs. we never compromise above standard like GET requests must not change any underlying resource data.

In advance scenario we may requires below verbs as well
  • PATCH
    • Use when partially updating the records or data in APIs (Ex. only update email address properties)
  • HEAD
    • Use when calling APIs without needing the response data in return. Ideally use for health checking API
Here is my list of HTTP verbs and their use cases, what's yours?

Comments