How to use the https.Agent function in https

To help you get started, we’ve selected a few https examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ExtraBB / open-psd2 / src / ing.ts View on Github external
constructor(useSandbox: boolean, _signingKey: string, _signingPassphrase: string, _tlsCertificate: string, _tlsKey: string, _clientId: string) {
        this.SANDBOX = useSandbox;
        this.apiBasePath = useSandbox ? "https://api.sandbox.ing.com" : "https://api.ing.com";
        this.signingKey = _signingKey;
        this.signingPassphrase = _signingPassphrase;
        this.tlsCert = _tlsCertificate;
        this.tlsKey = _tlsKey;
        this.clientId = _clientId;

        // Create HTTPS agent
        this.agent = new https.Agent({
            rejectUnauthorized: false,
            cert: this.tlsCert,
            key: this.tlsKey
        });
    }
github molnarg / node-http2 / test / http.js View on Github external
server.listen(1236, function() {
          var options = url.parse('https://localhost:1236' + path);
          options.agent = new https.Agent(agentOptions);
          https.get(options, function(response) {
            response.on('data', function(data) {
              expect(data.toString()).to.equal(message);
              done();
            });
          });
        });
      });
github teambition / node-push / lib / platforms / gcm.js View on Github external
configure (options = {}) {
    for (let key in options) {
      const val = options[key]
      this.options[key] = val
    }
    if (this.options.use_proxy) {
      this.agent = new Sock5Agent({
        socksHost: this.options.ss_proxy_host || 'localhost',
        socksPort: this.options.ss_proxy_port || 1080
      })
    } else {
      this.agent = new Agent()
    }
    return this
  }
github virtkick / http-master / modules / middleware / proxy.js View on Github external
function getAgent(config, portConfig) {
  let httpAgent = false, httpsAgent = false;
  var agentSettings = portConfig.agentSettings || config.agentSettings;
  if (agentSettings) {
    httpAgent = new http.Agent(agentSettings);
    httpsAgent = new https.Agent(agentSettings);
  }
  return {httpAgent, httpsAgent};
}
github digitalbazaar / did-io / lib / methods / veres-one / client.js View on Github external
constructor({injector, logger, mode, config, httpsAgent}) {
    this.injector = injector;
    this.config = config || require('./veres-one.config');
    this.mode = mode;
    this.logger = logger || console;

    this.httpsAgent = httpsAgent;
    if(mode === 'dev' && !this.httpsAgent) {
      this.httpsAgent = new https.Agent({rejectUnauthorized: false});
    }
  }

https

https mediation

ISC
Latest version published 10 years ago

Package Health Score

59 / 100
Full package analysis