How to use the postman-request.jar function in postman-request

To help you get started, we’ve selected a few postman-request 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 postmanlabs / postman-runtime / lib / requester / requester-pool.js View on Github external
keepAlive: _.get(options, 'requester.keepAlive', true),
        cookieJar: _.get(options, 'requester.cookieJar'), // default set later in this constructor
        strictSSL: _.get(options, 'requester.strictSSL'),
        maxResponseSize: _.get(options, 'requester.maxResponseSize'),
        followRedirects: _.get(options, 'requester.followRedirects', true),
        followOriginalHttpMethod: _.get(options, 'requester.followOriginalHttpMethod'),
        maxRedirects: _.get(options, 'requester.maxRedirects'),
        implicitCacheControl: _.get(options, 'requester.implicitCacheControl', true),
        implicitTraceHeader: _.get(options, 'requester.implicitTraceHeader', true),
        removeRefererHeaderOnRedirect: _.get(options, 'requester.removeRefererHeaderOnRedirect'),
        network: _.get(options, 'network', {})
    });

    // create a cookie jar if one is not provided
    if (!self.options.cookieJar) {
        self.options.cookieJar = RequestCookieJar();
    }

    if (fileResolver && typeof fileResolver.readFile === FUNCTION &&
        typeof (extendedRootCA = _.get(options, 'requester.extendedRootCA')) === STRING) {
        // eslint-disable-next-line security/detect-non-literal-fs-filename
        fileResolver.readFile(extendedRootCA, function (err, caCerts) {
            if (err) {
                // @todo trigger console error
            }
            else {
                // set extendedRootCA option
                self.options.extendedRootCA = caCerts;
            }

            return callback();
        });

postman-request

Simplified HTTP request client.

Apache-2.0
Latest version published 11 months ago

Package Health Score

81 / 100
Full package analysis