0
我試圖通過ajax訪問以下webservice,但它不工作。 http://task.woo.gy/api/v1/article/?format=json 用戶名: - 根 密碼: - 羅希特如何,我可以通過ajax訪問tastypie驗證webservice
AJAX功能
$.ajax({
type: "POST",
url: "http://task.woo.gy/api/v1/article/?format=json",
data: "{ 'username': 'root', 'password': 'rohit'}",
contentType: "application/json; charset=utf-8",
success: ajaxCallSucceed_allorder,
dataType: "json",
failure: ajaxCallFailed_allorder
});
function ajaxCallSucceed_allorder()
{
alert('success');
}
function ajaxCallFailed_allorder()
{
alert('failed');
}