An HTTP method is the verb in a request that states the intended operation on a resource. Requests also carry a path and may include headers and a body; the server uses these details to produce a response. section 1.4.1
Choose the method whose expected meaning matches the operation:
- GET fetches data without modifying server state and may be cacheable. section 5.2.2
- POST creates a new resource. section 5.2.2
- PUT creates or replaces an existing resource, PATCH modifies one, and DELETE removes one. section 5.2.2
Mapping methods in a minimal API
ASP.NET Core minimal APIs map methods to handlers with functions such as MapGet("/person/{name}", handler), MapPost, MapPut, MapPatch, and MapDelete. A browser commonly sends GET when following a link, while a client-side SPA or mobile app can send methods such as POST or DELETE. section 5.2.2
Table 5.1 The minimal API map endpoints and the corresponding HTML verbs (view table figure)
| Fetch data only; no modification of state. May be safe to cache. |
||
Use the method-to-operation table to compare minimal API mapping functions with their corresponding HTTP semantics. section 5.2.2
The method also helps ASP.NET Core select behavior. In Razor Pages, the HTTP method combines with an optional handler route value to choose one page handler, such as OnGet, OnPostAsync, or OnDelete. section 15.2









