REST "Uncaught ReferenceError: sn_ws is not defined"

xiaix
Tera Guru

find_real_file.png

function testMe()

{

      var r = new sn_ws.RESTMessageV2('test', 'get');

      console.debug("r: " + r);

     

      var response = r.execute();

      console.debug("response: " + response);

     

      var responseBody = response.getBody();

      console.debug("responseBody: " + responseBody);

     

      var httpStatus = response.getStatusCode();

      console.debug("httpStatus: " + httpStatus);

}

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi David,



You may find the below thread helpful.


Scope Question: Integration APIs - sn_ws


View solution in original post

10 REPLIES 10

FWIW, I refer to it because I wrote it.