O'Reilly logo

Mastering ASP.NET Web API by Malendra Hurbuns, Mithun Pattankar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required