liveBook · Manning

REST

As explained in ASP.NET Core in Action, 3e

A RESTful API is a web API designed around REST constraints and resource-oriented HTTP interactions.

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:

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.
CH02_F05_Lock3

Compare REST API clients with traditional HTML applications and RPC services in a single ASP.NET Core server model. section 2.3

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines stateless HTTP interactions and maps common verbs to operations, but does not detail broader REST constraints.
Examples
Uses a C# MapGet route, HTTP verb mappings, and Postman, Rider HTTP Client, or Swagger UI for testing.
What it assumes
Teaches HTTP requests and responses while assuming enough application context to choose resources and operations.
What you can do after
Apply it via ASP.NET Core minimal APIs by assigning resource operations to semantically appropriate HTTP verbs.
How it connects
Connects REST with HTTP, minimal APIs, web APIs, single-page applications, gRPC, and GraphQL.

Also explained in

Compare how 22 books explain REST →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.