How to use the postman-collection.FormParam 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
const eventList = new pmCollection.EventList(null, [event]);
eventList.listeners("string"); // $ExpectType Event[]
eventList.listenersOwn("string"); // $ExpectType Event[]

pmCollection.EventList.isEventList(eventList); // $ExpectType boolean

// FormParamDefinition Tests

const fpDef: pmCollection.FormParamDefinition = {};
fpDef.key; // $ExpectType string | undefined
fpDef.value; // $ExpectType any

// FormParam Tests

const fp = new pmCollection.FormParam(fpDef);
fp.key; // $ExpectType string
fp.value; // $ExpectType any

fp.toString(); // $ExpectType string
fp.valueOf(); // $ExpectType any

// HeaderDefinition Tests

const headerDef: pmCollection.HeaderDefinition = {
    key: "string",
    value: "string"
};
headerDef.key; // $ExpectType string | undefined
headerDef.value; // $ExpectType string | undefined
headerDef.system; // $ExpectType boolean | undefined
github postmanlabs / postman-runtime / lib / runner / request-helpers-presend.js View on Github external
_.forEach(results, function (result) {
                            // Insert individual param above the current formparam
                            result && formdata.insert(new sdk.FormParam(_.assign(formparam.toJSON(), result)),
                                formparam);
                        });
github postmanlabs / openapi-to-postman / lib / util.js View on Github external
_.forOwn(bodyData, (value, key) => {
        if (encoding.hasOwnProperty(key)) {
          _.forOwn(encoding[key].headers, (value, key) => {
            if (key !== 'Content-Type') {
              if (encoding[key].headers[key].hasOwnProperty('$ref')) {
                encoding[key].headers[key] = getRefObject(encoding[key].headers[key].$ref);
              }
              encoding[key].headers[key].name = key;
              formHeaders.push(this.convertToPmHeader(encoding[key].headers[key]));
            }
          });
        }
        if (typeof value === 'object') { value = JSON.stringify(value); }

        param = new sdk.FormParam({
          key: key,
          value: value
        });
        paramArray.push(param);
      });
      updateOptions = {