REST, or representational state transfer, organizes web APIs around lightweight, stateless HTTP calls. Clients use these calls to read, create or update, and delete data. section 2.3
ASP.NET Core can expose RESTful APIs through minimal APIs or web APIs for mobile applications, JavaScript single-page applications, and other clients. section 2.3 section 1.6
Choose HTTP verbs according to the resource operation:
- GET fetches data without modifying state and may be safe to cache. section 5.2.2
- POST creates a new resource. section 5.2.2
- PUT creates or replaces an existing resource. section 5.2.2
- PATCH modifies a resource, while DELETE removes it. section 5.2.2
A minimal REST endpoint
app.MapGet("/person/{name}", (string name) => people.Where(p => p.FirstName.StartsWith(name))); This endpoint responds to GET requests, reads a name from the route, and returns matching people without changing application state. Test non-GET endpoints with a request-capable tool such as Postman, Rider's HTTP Client plugin, or Swagger UI. section 5.2.2
REST remains widely usable because platforms and programming languages support HTTP requests and responses. Its tradeoffs include verbosity and difficulty evolving deployed APIs; gRPC and GraphQL address different parts of those limitations. section 33.1
Figure 2.5 ASP.NET Core can act as the server-side application for a variety of clients: it can serve HTML pages for traditional web applications, act as a REST API for client-side SPA applications, or act as an ad hoc RPC service for client applications.
Compare REST API clients with traditional HTML applications and RPC services in a single ASP.NET Core server model. section 2.3





















