📜  javascript cors 错误 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:12.359000             🧑  作者: Mango

代码示例1
$.ajax({
            headers: { "Accept": "application/json"},
            type: 'GET',
            url: 'http://cl.ly/2wr4',
            crossDomain: true,
            beforeSend: function(xhr){
                xhr.withCredentials = true;
          },
            success: function(data, textStatus, request){
                console.log(data);
            }
 });