A request message carries a client’s request to an HTTP server. Its verb indicates the intended operation: GET retrieves data, while POST sends data for server processing, such as completing a form. In an ASP.NET Core minimal API, endpoints respond to requests by matching the verb and URL path. section 3.6 section 5.2.2
Use request messages with these practical distinctions:
- Use GET to fetch data without changing server state; use POST to send data or create a new resource. section 5.2.2
- Map a POST request to a minimal API endpoint with MapPost(); clients such as single-page applications and mobile apps can send verbs that browsers do not usually issue by navigation. section 5.2.2
- Access the complete incoming request through HttpRequest, including request-specific details; inject the exact type needed when that makes the handler clearer. section 7.6.1
- Let minimal API binding obtain values from explicit sources, route values, query strings, services, or a JSON request body; a failed required binding produces a 400 response. section 7.8
Form submission to an API
A form submission can send a POST request containing data to an endpoint. The application maps that request with MapPost(), then processes the submitted data instead of treating the request as a page navigation. section 3.6 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. |
||
Compare the minimal API mapping methods with their HTTP verbs and expected operations, including POST for creating a resource. section 5.2.2













