This project demonstrates using ASP.NET Core API basic functionality for a store eCommerce Restful API application.
Open the solution in Visual Studio 2019 and press F5, to run the tests including unit tests and integration tests use Visual Studio test explorer.
Run the app and then browse the root address https://localhost:44361 to see basic UI generated by Swagger UI.
Instruction to add required authorization header:
- Post the following content to
https://localhost:44361/api/authand copy the token from the response.
{
"username": "Test",
"password": "Not for production use, DEMO ONLY!"
}- Open the root address
https://localhost:44361and click onAuthorizebutton on the left-top corner and enter 'Bearer token', replace token with the copied token from the previous step. - Click
Authorize. You should be able to access all the APIs listed underProductsnow.