-2
SERVICES.startconference(meet.value, participants, function(res) {

Log.d("div", "getting success response and posting to new tab", res&& res.OUTERHTML);

.....

}
Mathews Sunny
  • 1,778
  • 7
  • 20
  • 29
SAI KRISHNA
  • 159
  • 1
  • 1
  • 11

1 Answers1

0

Here is some code you can use :

    <script>
    let use_api = function(){
        req = new XMLHttpRequest()
        req.setRequestHeader("Content-type", "application/json");
        req.onreadystatechange = function(){
            if(req.readyState == 4 && req.status==200){
               let data = JSON.parse(xhr.responseText);
               //here you should update your UI with the received data!  
            }
        }
        let req_body = JSON.stringfy({"username":"asdfasdf"}) //username is just an example, you should write things you want to send to API endpoint
        req.open('POST',url,true)
        req.send(req_body)

    }
</script>

Have a look on this too.
Good Luck.

Shahryar Saljoughi
  • 2,189
  • 19
  • 38