Can someone point me in the right direction?
Sample URL: url.com/api/$order/config?fname=$fname&lname=$lname&serial_number=$sn
Code:
var fullUrl = "[URLHERE.com]/api/$order/config?";
$.ajax({
url: fullUrl,
contentType: "application/json",
dataType: "jsonp",
type: 'GET',
jsonp: '$callback',
beforeSend: function setHeader(xhr) {
xhr.setRequestHeader('Authorization', token);
},
success: callback,
error: function (xhr, ajaxOptions, thrownError) {
alert(thrownError);
},
});
Questions:
What does the "jsonp: '$callback'," line do?
How can I retrieve fname, lname, and serial_number?
Does the jsonp callback outputs a json data file?