Passing parameters to promise's success callback in angularjs $q
I realize this is a very similar question to this one . But I'm still unclear on how to do it in my situation. Just need some help with a successful callback. This is what works: function getStuff(accountNumber) { var logMessage = 'POST GetStuff'; return $http.post(GetStuff, { custId: accountNumber }) .then(log); } function log(response) { logger.debug(response); return response; } This is what I want to accomplish: function getStuff(accountNumber) { var logMessage = 'POST GetStuff'; return $http.post(GetStuff, { custId: accountNumber }) .then(log(response, logMessage); } function log(response