How to use the forever-agent.SSL.call function in forever-agent

To help you get started, we’ve selected a few forever-agent 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 itteco / iframely / lib / agent.js View on Github external
try {
        url = URL.parse(options.uri, true);
    } catch (e) {
        throw new Error('a `uri` must be valid!');
    }

    if(url.protocol === 'http:') {
        return new HttpAgent(options);
    }

    if (!(this instanceof Agent)) {
        return new Agent(options);
    }

    HttpsAgent.call(this, options);

    this.init(url, options);
}
github elastic / elasticsearch-js / src / lib / connectors / _keep_alive_agent.js View on Github external
function WrapForeverSSLAgent(opts) {
  ForeverSSLAgent.call(this, opts);
  var _addRequest = this.addRequest;
  this.addRequest = function (req, host, port) {
    req.useChunkedEncodingByDefault = false;
    _addRequest.call(this, req, host, port);
  };
}
inherits(WrapForeverSSLAgent, ForeverSSLAgent);

forever-agent

HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.

Apache-2.0
Latest version published 10 years ago

Package Health Score

74 / 100
Full package analysis

Similar packages