嗨,我将json发布到django web 服务不幸的是,即使我得到结果200,这个方法也没有触发成功功能我已经将数据类型更改为“ json ”“ text ”“ html ”但什么也没得到
Web服务协议是jsonrpc
谢谢您的帮助
function displaySearchResult(response) {
if (response.result)
alert(response.result);
else if (response.error)
alert("Search error: " + response.error.message);
};
var url = "http://www.xxxxxxxx.com/django/json/";
var request = {};
request.method = "liveScore";
request.params = {};
request.params.date = "1392/08/04";
request.params.hash = "123";
request.id = 1;
request.jsonrpc = "2.0";
$.post(url JSON.stringify(request), displaySearchResult, "json");