Note the .then promise method accepting success and error callbacks in http example