npm.io
1.0.0 • Published 4 years ago

insomnia-plugin-variables

Licence
MIT
Version
1.0.0
Deps
0
Size
95 kB
Vulns
0
Weekly
0
Stars
2

insomnia-plugin-variables

A (subjectively) better way to chain requests in insomnia/inso CLI

How to get it?

  • Use NPM:
$ # inside insomnia plugins folder
$ npm install insomnia-plugin-variables
  • Or using the plugin configuration screen inside insomnia: Plugin configuration screen screenshot

How to use it?

  • When testing, it's possible to define variables programmatically:
await global.setVar('my-var', 'value');
const response1 = await insomnia.send();
await global.setVar('my-var2', 'other value');
  • Then just use the tag for putting the value on a header or on the body: Tag config screenshot
Persisting values
  • Values can be persisted, to enable it, open the plugin configuration from the document menu: Document menu

  • And then enable it: Configuration