In the Controllers folder, open ValuesController.cs, and note the following:
- The [Route] attribute registers the /api/values relative URL for clients to use to make HTTP requests that will be handled by this controller. The /api/ base route followed by a controller name is a convention to differentiate between MVC and Web API. You do not have to use it. If you use [controller] as shown, it uses the characters before Controller in the class name, or you can simply enter a different name without the brackets.
- The [HttpGet] attribute registers the Get method to respond to HTTP GET requests, and it returns an array of string values.
- The [HttpGet] attribute with a parameter registers the Get method ...