Consuming web APIs using JavaScript

JavaScript is the programming language of HTML and the web. Every UI framework works with JavaScript. We won't be focusing on learning JavaScript, but if you're new to this, then I recommend learning it from the W3Schools website at https://www.w3schools.com/js/.

In this section, we will consume (call) the PacktContacts (ASP.NET Core Web API) using JavaScript and perform authentication and CRUD operations.

Create any web application (ASP.NET, MVC5, or any non-.NET web applications); the code bundle will use an ASP.NET empty application.

Create an HTML file to copy the following code to display the contact list, and add the contacts:

 <body class="container"> <div > <h1>Consuming ASP.NET Core Web API using ...

Get Mastering ASP.NET Web API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.