ChaitanyaKaranam/servicenow-rest-api

option to configure HTTP proxy

Closed this issue · 3 comments

sometimes we all are working behind firewalls in such cases its a feature request to add proxy

sometimes we all are working behind firewalls in such cases its a feature request to add proxy

Will be providing an option to attach custom agent to your network requests.

This issue should be fixed in PR. Latest code is in development branch.

Can you confirm if this fixes the issue?

const sn = require('./servicenow');
const ServiceNow = new sn('devserver','admin','password');
const HttpsProxyAgent = require('https-proxy-agent');

let agent = new HttpsProxyAgent({host: "123.252.137.238", port: "54107"});

ServiceNow.setNetworkOptions({
    httpsAgent: agent
})

ServiceNow.Authenticate();

This should be fixed in v1.1