Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var xhr = new XMLHttpRequest(),
  2. body = JSON.stringify({"content": "", "to": ["5511960638913"]});
  3. xhr.open("POST",'https://platform.clickatell.com/messages',true);
  4. xhr.setRequestHeader("Content-Type", "application/json");
  5. xhr.setRequestHeader("Authorization", "lPe91jCqTwGbErZ6OFeXjQ==");
  6. xhr.onreadystatechange = function(){
  7. if (xhr.readyState == 4 && xhr.status == 200) {
  8. console.log('success');
  9. }};
  10. xhr.send(body);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement