minimal-apis.github.io
minimal-apis.github.io copied to clipboard
Routing
Could we add something like the following to the Basic Routing section on the quick start page?
Keep in mind, once you start assigning specific URL routes such as "/hello", you will need to make sure you are referencing that particular route when running the code.
For example, when clicking the host link http://localhost:5000, you will be met with a "No Webpage Found" if nothing is assigned to the homepage. In order to reference the hello page, you will need to update the link to http://localhost:5000/hello.
Also in subsections 'Route Variables' and 'Constraints', am I supposed to know how to assign variables at that point in the doc?
For example,
app.MapGet("/hello/{name}", (string name) => $"Hello {name}");
Am I supposed to know how to add or change the name value. Like how can I change the name value to David?
We should have an example URL, agree (e.g http://localhost:5000/hello/David
)