1
Expected Duplication 1jQuery的AJAX - JSONP將文本轉換爲JSON
我正在尋找關於JSONP好好解釋各種問題,但還是沒能找到。
例如,
我想使用JSONP
做跨域請求和響應的格式是text/plain
。有沒有辦法覆蓋或重新格式化迴應?即解析text/plain
響應與dataType: "jsonp"
我總是得到錯誤,
Resource interpreted as Script but transferred with MIME type text/plain: "Some_url"
Uncaught SyntaxError: Unexpected identifier
有人可以解釋我的RESTAPI應該總是返回JSON格式的結果?