Hi Stanley, Eugene,
Thank you for reaching out to Microsoft Q & A forum.
I have finished the tutorial exercise on, Creating a Web API Project , and I found the instructions straightforward and easy to follow. Following them, I managed to set up a new API application.
1.Build and test the web API
Following the successful build of the web API application, it can be executed from the command line interface. Upon execution, the application will be allocated a specific port number. Subsequently, you can access the application by launching a web browser and entering the URL: https://localhost:{PORT}/weatherforecast, substituting "{PORT}" with the assigned port number. This action will yield the desired results presented in JSON format
I've attached a screenshot for your reference:
- Explore with .http files
Before going through the .http files you must install REST Client extension
Then after going through explore with .http files.
1.Open the ContosoPizza.http file.
This file has been pre-configured with the @ContosoPizza_HostAddress variables and a GET command calling /weatherforecast/ that accepts application/json.
2.Select the Sent Request command above the GET which will send a request to the running service.
I've attached a screenshot for your reference:
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.
Thank you.