Bots Home
|
Create an App
ajaxtest
Author:
ajaxtest
Description
Source Code
Launch Bot
Current Users
Created by:
Ajaxtest
cb.onEnter(function(viewer) { var u = viewer['user']; //console.log(u); cb.sendNotice("hiii"); myajax(); }); function myajax(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE ) { if (xmlhttp.status == 200) { cb.sendNotice(xmlhttp.responseText); } else if (xmlhttp.status == 400) { cb.sendNotice("400"); } else { cb.sendNotice("err"); } } }; xmlhttp.open("GET", "https://jsonplaceholder.typicode.com/posts/1", true); xmlhttp.send(); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.