使用JIRA REST API请求JSONP时出错



我使此功能从jira请求一些票证,我将数据类型作为JSONP避免了交叉来源问题,当我提出请求时,我在浏览器调试器中获得响应,但是无法处理JSON响应" SyntaxError:Missing; Missit;在语句之前",如果我发送JSONP请求?

,是否有任何方法可以阅读JSON?
     var ajaxUrl = jira/rest/api...
     jQuery.ajax({
        url:ajaxUrl,
        dataType: 'jsonp',
        jsonpCallback: 'callback',
        type : "GET",
        beforeSend: function (xhr){
          success: function w(data){
            console.log(data);
            alert('Sucess data: ' + data);
          };
          error: function e(data){alert('alert error');}
        }
    })

我解决了这个问题,我更改了JSON中的JSONP,然后从JIRA服务器重新重塑了CORSS,此处如何解释它:https://community.atlassian.com/t5/answers-developer-questions/enable-cors-in-jira-rest-api/qaq-p/553997,看起来这个问题在前飞机上。

最新更新