Created
May 22, 2024 13:19
-
-
Save diogenesjup/aec5e8b395860e1950f939d1650a0cae to your computer and use it in GitHub Desktop.
WATIS API NODE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var options = { | |
'method': 'POST', | |
'url': 'SEU ENDPOINT', | |
'headers': { | |
'Content-Type': 'application/x-www-form-urlencoded' | |
}, | |
form: { | |
'origem': 'postman', | |
'destino': '5511999999999', | |
'msg': 'Enviando uma mensagem de teste', | |
'controle': 'SEU TOKEN', | |
'imagem': '' | |
} | |
}; | |
request(options, function (error, response) { | |
if (error) throw new Error(error); | |
console.log(response.body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment