I am using python&Django for backend.
How to send List format to the bakend via ajax
Any sort of help should be appreciable
EMBER
var data_payload = [{"title":"ember", "title":"ember-cli"}]
return ajax({
url: 'here django server url',
type: 'post',
data: JSON.stringify(data_payload)
}).then(function(output) {
return output;
});
DJANGO:
I am getting wrong format as below
{u'[{"title":"ember"},{"tile":"ember-cli"}]': u''}
The correct format should be like
[{"title":"ember"},{"tile":"ember-cli"}]
Aucun commentaire:
Enregistrer un commentaire