abeyahmad / servicenow-rest

18 stars 13 forks source link

Not able to set proxy #8

Open venkat-subramani opened 7 years ago

venkat-subramani commented 7 years ago

I'm new to ServiceNow, I need to call the REST API of ServiceNow using node.js. But my company firewall is blocking the API, I tried adding proxy through addProxy method to GlideRecord then i got the following error

TypeError: gr.addProxy is not a function
    at Object.<anonymous> (D:\Projects\AMS_Automation\ServiceNow\sn\app1.js:5:4)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3

How can I call ServiceNow REST API through proxy for my company network ?

venkat-subramani commented 7 years ago

I think GlideRecord.js is not having any addProxy method, instead setProxy is the method needs to be used. With setProxy method, now corporate firewall allows ServiceNow API.

Please update the documentation.