JQuery is a JavaScript library that greatly simplifies JavaScript programming.
To learn JQuery, read through the documentation at https://www.w3schools.com/jquery/.
We will be using the same project that we were working on in the previous section. Add HTML and JavaScript file to it.
The JavaScript file that JQuery uses to consume the web API looks as follows:
function doLogin() { var loginUrl = endpoint + "/api/auth/token"; var sendObject = JSON.stringify({ username: $("#uname").val(),
password: $("#psw").val() }); $.ajax({ url: loginUrl, contentType: 'application/json; charset=UTF-8', data: sendObject, method: "POST" }).done(function (data, status) { if (status == "success") { if (data.token...