-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,796
  • 7
  • 21
  • 31
SAI KRISHNA
  • 329
  • 1
  • 4
  • 12

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,599
  • 22
  • 41