ChaitanyaKaranam / servicenow-rest-api

Node.js Wrapper library for ServiceNow REST API.
https://www.npmjs.com/package/servicenow-rest-api
MIT License
18 stars 21 forks source link

option to configure HTTP proxy #5

Closed hariom282538 closed 5 years ago

hariom282538 commented 5 years ago

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

ChaitanyaKaranam commented 5 years ago

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.

ChaitanyaKaranam commented 5 years ago

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();
ChaitanyaKaranam commented 5 years ago

This should be fixed in v1.1