Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

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.