I am searching a proper explanation about JSONP in various question but still not able to find.
For example,
I wanted to do a cross domain request using JSONP
and the format of the response is text/plain
. Is there any way to override or re-format the response? i.e. parsing the text/plain
response with dataType: "jsonp"
I always get the error,
Resource interpreted as Script but transferred with MIME type text/plain: "Some_url"
Uncaught SyntaxError: Unexpected identifier
Can someone explain me that the RestAPI should always return JSON formatted result?