mercredi 17 juin 2015

Retrieve JSON Payload in Server Response from a Post Request with Ember Data

I must be really missing something but I can't find a way to retrieve the json payload from a post request using ember data. For example:

  var onSuccess = function(data) {
    //Want to get json payload from data
  };

  var onFail = function(data) {
    //Want to get json payload from data
  };

  // save model which sends a post request to the server
  model.save().then(onSuccess, onFail); 

Any help much appreciated!




Aucun commentaire:

Enregistrer un commentaire