$.ajax
$.ajax gives full control.
Example
$.ajax({
url: "/api/items",
method: "POST",
data: JSON.stringify({ n: 1 }),
contentType: "application/json",
dataType: "json"
}).done(function (d) {}).fail(function () {});Exercise
Failure handler.
.(function () {})
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.