How to use the postman-collection.ProxyConfig function in postman-collection

To help you get started, we’ve selected a few postman-collection 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 DefinitelyTyped / DefinitelyTyped / types / postman-collection / postman-collection-tests.ts View on Github external
item.getEvents(); // $ExpectType Event[]
item.getEvents("string"); // $ExpectType Event[]

pmCollection.Item.isItem(item); // $ExpectType boolean

// ProxyConfigDefinition Tests

const proxyConfDef: pmCollection.ProxyConfigDefinition = {};
proxyConfDef.match; // $ExpectType string | { pattern: string; } | UrlMatchPattern | undefined
proxyConfDef.host; // $ExpectType string | undefined
proxyConfDef.port; // $ExpectType number | undefined
proxyConfDef.tunnel; // $ExpectType boolean | undefined

// ProxyConfig Tests

let proxyConf = new pmCollection.ProxyConfig();
proxyConf = new pmCollection.ProxyConfig(proxyConfDef);

proxyConf.host; // $ExpectType string
proxyConf.match; // $ExpectType UrlMatchPattern
proxyConf.port; // $ExpectType number
proxyConf.tunnel; // $ExpectType boolean

proxyConf.getProtocols(); // $ExpectType string[]

proxyConf.getProxyUrl(); // $ExpectType string

proxyConf.test("string"); // $ExpectType boolean

proxyConf.update(proxyConfDef); // $ExpectType void

proxyConf.updateProtocols(["string"]); // $ExpectType void
github DefinitelyTyped / DefinitelyTyped / types / postman-collection / postman-collection-tests.ts View on Github external
item.getEvents("string"); // $ExpectType Event[]

pmCollection.Item.isItem(item); // $ExpectType boolean

// ProxyConfigDefinition Tests

const proxyConfDef: pmCollection.ProxyConfigDefinition = {};
proxyConfDef.match; // $ExpectType string | { pattern: string; } | UrlMatchPattern | undefined
proxyConfDef.host; // $ExpectType string | undefined
proxyConfDef.port; // $ExpectType number | undefined
proxyConfDef.tunnel; // $ExpectType boolean | undefined

// ProxyConfig Tests

let proxyConf = new pmCollection.ProxyConfig();
proxyConf = new pmCollection.ProxyConfig(proxyConfDef);

proxyConf.host; // $ExpectType string
proxyConf.match; // $ExpectType UrlMatchPattern
proxyConf.port; // $ExpectType number
proxyConf.tunnel; // $ExpectType boolean

proxyConf.getProtocols(); // $ExpectType string[]

proxyConf.getProxyUrl(); // $ExpectType string

proxyConf.test("string"); // $ExpectType boolean

proxyConf.update(proxyConfDef); // $ExpectType void

proxyConf.updateProtocols(["string"]); // $ExpectType void
github postmanlabs / postman-runtime / lib / runner / request-helpers-presend.js View on Github external
], function (err, config) {
            if (err) {
                run.triggers.console(context.coords, 'warn', 'proxy lookup error: ' + (err.message || err));
            }

            config && (request.proxy = sdk.ProxyConfig.isProxyConfig(config) ? config : new sdk.ProxyConfig(config));

            return done();
        });
    },