In typescript I am trying to implement ajax async call and handle it through handler method. below is the code snippet:
var JQryAjxSetting: JQueryAjaxSettings = {
url: "h***//test/test.svc/GetUploadId",
type: "GET",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
error: function (xhr, status, error) { alert(error); },
success: function () { alert("success"); },
jsonpCallback: 'SetUpLoadID',
};
In above declaration I expect a jsonpCallback: is the place where I handle call back. in "SetUpLoadID" I want to get the response which is serialized json data. So in SetUpLoadID method how will I receive data? similar to event will I get some variable where event.data will give me data sent from the server as a response?