Test Local WebApi

In this step we will use a browser page to make calls against the local WebApi (PetStoreCLI) project.

5.1 Test WebApi using Browser

  1. CD into the solution folder (LazyStackTutorial\PetStoreCLI) and run the WebApi project.
    dotnet run --project PetStoreCLI --launch-profile PetStoreCLI
  2. Open a browser window and enter the following URL:
    The Swagger interface page appears,.
  3. Execute the "/pet/seedPets" call. (Note: You need to click on "Try it Out".) Two pets are added to the DynamoDB table.
  4. Execute /pet/findByStatus with petStatus = 0. Two pet records are returned in the Response body.
  5. CTRL-C in the command window to Stop Debugging.
Step Summary

In this step we launched the local WebApi (PetStore) project and then made calls against it using the local server's Swagger page. Our call to "/pet/seedPets" executed the PetStoreRepo project's PetRepo.SeedPetsAsync() method. The local WebApi (PetStore) project used your local AWS credentials to access the PetStoreDev stack DynamoDB resource.

In addition to making calls using the browser, later lesson steps will demonstrate making calls against the WebApi (PetStore) project from client apps. This allows you to debug both the client code and controller code at the same time.