I'm trying to get a JSONP response from the REST API, but it is only returning JSON. I need to use JSONP because it is a cross domain request
Here's is my jquery code which calls the API
$.ajax(
{
type: 'GET',
url: '***********************t',
jsonp: "SCPRESPONSE",
dataType: "JSONP",
data: {
'OPERATION_NAME': 'ADD_REQUEST',
'INPUT_DATA': inputData,
'TECHNICIAN_KEY': '*******************************************',
'format': 'json'
},
success: function (json) {
console.log(json.operation);
},
error: function (e) {
console.log(e.message);
}
}
);
I've tried changing the 'format' to 'jsonp' but then the API returns an XML formatted error about content in the prolog
I've also tried changing the content type to application/json etc
Note that it successfully adds the request but the client side JS can't handle the response from the server because it is a JSON response, and not a JSONP response