Understanding jQuery Deferred.pipe()
问题 I am trying to implement the jQuery Deferred.pipe() method for the following scenario: Add a user in DB via $.ajax() Get response whether user was added correctly or not. If successfully added, get all the user list from server via $.ajax() Display the list via jQuery templates This is something which I tried: var addUserSuccess = function( data ) { if ( data.returnCode !== "success" ) { return $.Deferred().reject('Error saving user'); } getUsers(); } var addUser = function() { return $.ajax