Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
36 Views

N.API.getUsers 404 error?

Hi,

   How to use JAVA HttpURLConnection or javascript to request resutful-api N.API.getUsers/getUser? How to set Method and Parameters? I always got 404 error!

   javascript: 

      var req = new XMLHttpRequest();

      var url = 'http://192.168.0.159:3004/getUsers/';

      var body = {room:"xxxxxroomIdxxxxxx"};

      var req.onreadystatechange = function(){

         if(req.readyState === 4){

                  console.log(req.responseText);

         }

     }

     req.open('GET', url, false);// POST/GET

     req.send(JSON.stringify(body));

  Anybody help? Thanks!

Tags (2)
0 Kudos
0 Replies