Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- request.post({
- form: { method: 'send',
- username: 'max13',
- password: '****',
- from: '0000',
- to: admin1,
- message: 'user '+ user_name +' has sent a job'
- },
- url: 'http://www.thsms.com/api/rest',
- form: {method: 'send',
- username: 'max13',
- password: '****',
- from: '0000',
- to: admin2,
- message: 'user '+ user_name +' has sent a job'},
- url: 'http://www.thsms.com/api/rest',
- .then(function(){
- return //your sms api code for admin1
- })
- .then(function(){
- return //your sms api code for admin2
- })
- .fail(function(){
- log error if any of above then block get failed
- })
Add Comment
Please, Sign In to add comment