PacktContacts - Recap of the demo web API project
In Chapter 12, Hosting and Deployment, we read about the demo ASP.NET Core Web API project known as PacktContacts
, and hosted and deployed it on various environments.
The web API does a basic CRUD operation on the Contact
model. We will be using this web API hosted on IIS as an end point for accessing it.
The Contact
class file in the model folder acts as a complex object that is used as a model for data transfer over a network:
namespace PacktContacts.Model { public class Contact { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } } }
Dealing with a cross-origin issue
When we tested the PacktContacts
web API, either using Postman or Fiddler, they responded by calling with the appropriate response. When they hosted the endpoint URL of the web API that is used in modern...