liveBook · Manning

Url path

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

An HTTP path identifies the resource or resource location targeted by an HTTP request.

A URL path identifies the resource or location targeted by an HTTP request. In a complete web address, the hostname identifies the server location, while the path is the part that follows the domain name. For example, the path in www.example.org/account/manage is /account/manage. section 1.4.1 section 3.6

Mapping a path in ASP.NET Core

A minimal API connects an HTTP verb and path to response logic: app.MapGet("/", () => "Hello World!"); This endpoint returns plain text when a client sends a GET request to the root path /. MapGet's first argument selects the URL path; its second argument generates the response. section 3.6

Figure 1.2 Requesting a web page. The user starts by requesting a web page, which causes an HTTP request to be sent to the server. The server interprets the request, generates the necessary HTML, and sends it back in an HTTP response. Then the browser can display the web page.
CH01_F02_Lock3

Follow the request from a browser to the server and back through the HTTP response. section 1.4.1

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

How deep it goes
Defines path composition and demonstrates routing it with MapGet, but stops short of detailed HTTP protocol internals.
Examples
Uses /account/manage as a path example and maps the root path / to a Hello World response.
What you can do after
Apply it via ASP.NET Core's MapGet function to associate a GET request with a URL path and response.
How it connects
Connects URL, hostname, HTTP request, HTTP verb, DNS, and ASP.NET Core endpoints.

Also explained in

Compare how 3 books explain url path →

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.