How to use the postman-collection.QueryParam 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
pmCollection.ProxyConfigList.isProxyConfigList(proxyConfigList); // $ExpectType boolean

// QueryParamDefinition Tests

const qpDef: pmCollection.QueryParamDefinition = {
    key: null,
    value: null
};
qpDef.key; // $ExpectType string | null
qpDef.value; // $ExpectType string | null
qpDef.system; // $ExpectType boolean | undefined

// QueryParam Tests

let qp = new pmCollection.QueryParam("string");
qp = new pmCollection.QueryParam(qpDef);

qp.key; // $ExpectType string | null
qp.value; // $ExpectType string | null
qp.system; // $ExpectType boolean | undefined

qp.toString(); // $ExpectType string

qp.update("string"); // $ExpectType void
qp.update({key: "string"}); // $ExpectType void
qp.update({key: "string", value: "string"}); // $ExpectType void

qp.valueOf(); // $ExpectType string

pmCollection.QueryParam._postman_propertyAllowsMultipleValues; // $ExpectType boolean
pmCollection.QueryParam._postman_propertyIndexKey; // $ExpectType string
github DefinitelyTyped / DefinitelyTyped / types / postman-collection / postman-collection-tests.ts View on Github external
pmCollection.ProxyConfigList.isProxyConfigList(proxyConfigList); // $ExpectType boolean

// QueryParamDefinition Tests

const qpDef: pmCollection.QueryParamDefinition = {
    key: null,
    value: null
};
qpDef.key; // $ExpectType string | null
qpDef.value; // $ExpectType string | null
qpDef.system; // $ExpectType boolean | undefined

// QueryParam Tests

let qp = new pmCollection.QueryParam("string");
qp = new pmCollection.QueryParam(qpDef);

qp.key; // $ExpectType string | null
qp.value; // $ExpectType string | null
qp.system; // $ExpectType boolean | undefined

qp.toString(); // $ExpectType string

qp.update("string"); // $ExpectType void
qp.update({key: "string"}); // $ExpectType void
qp.update({key: "string", value: "string"}); // $ExpectType void

qp.valueOf(); // $ExpectType string

pmCollection.QueryParam._postman_propertyAllowsMultipleValues; // $ExpectType boolean
pmCollection.QueryParam._postman_propertyIndexKey; // $ExpectType string
github postmanlabs / openapi-to-postman / lib / util.js View on Github external
encoding[key].schema = {
            type: typeof value
          };
          params = this.convertParamsWithStyle(encoding[key], value);
          // TODO: Show warning for incorrect schema if !params
          params && params.forEach((element) => {
            if (typeof element.value === 'object') { element.value = JSON.stringify(element.value); }
            // element.value = JSON.stringify(element.value);
            delete element.description;
          });
          paramArray.push(...params);
        }
        else {
          if (typeof value === 'object') { value = JSON.stringify(value); }

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