I'm trying to get data from Django server using jQuery.
Here is code I'm using: myCode
$(function(){
function callback(res){
console.log(res);
}
$.ajax({
url: "http://www.chesno.org/ajax/dispatcher/",
data: {
"data": "{'cmd':'get_party_list'}"
},
dataType: 'json',
success: callback,
complete: callback,
crossDomain: true,
async: false
});
})
The interesting thing is that I'm able to reach data through browser or fiddler ( link ). Please give me a hint on what I'm doing wrong. The important part is that I don't have access to the server, I just can communicate with developers of the site and they don't know yet where the problem is.
服务提供商需要使用跨域资源共享 ,并使其资源使用与您的来源匹配的Access-Control-Allow-Origin
标头进行响应。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.