0
我正在使用django,并试图通过POST检索由jQuery发送的列表。POST后处理响应对象
侦错码:
$.ajax({
method: 'POST',
url:'/coupons/sideContentCoupons/',
success: function(data){
// access response and retrieve data.
}
});
的处理程序:
def sideContentCoupons(request):
response = HttpResponse("", None, 200, "")
response['field'] = "data"
return response
这是访问 '田' 一个基本的尝试,但我不能让 “数据”。
如何访问该字段?
我不需要任何数据发送到处理程序,我只需要处理,它在响应 –
方法=后返回数据?????它的类型不是方法 –
大声笑2.5年后... type = post也不起作用。 – locrizak