Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xhr = new XMLHttpRequest(),
- body = JSON.stringify({"content": "", "to": ["5511960638913"]});
- xhr.open("POST",'https://platform.clickatell.com/messages',true);
- xhr.setRequestHeader("Content-Type", "application/json");
- xhr.setRequestHeader("Authorization", "lPe91jCqTwGbErZ6OFeXjQ==");
- xhr.onreadystatechange = function(){
- if (xhr.readyState == 4 && xhr.status == 200) {
- console.log('success');
- }};
- xhr.send(body);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement