Monaca Onsen UI Discord Chat Github Repo

Why cant I connect outside?



  • I added this code
    function button(who, state)
    {
    console.log(‘button:’);
    var xhr = new XMLHttpRequest();
    var body = 'who ’ + who + "\nstate " + state;
    xhr.open(“POST”, ‘http://192.168.171.1/submit’, true);
    xhr.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);
    xhr.send(body);
    }

    for onclick of a simple button. It works fine in browser, why it dont work in Monaco IDE ?
    All I see in console log is
    button:
    try - catch dosnt catch any errors too