0.2.0 • Published 5 years ago

insomnia-plugin-param v0.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

insomnia-plugin-param

NPM CircleCI

An Insomnia plugin to ask values to the user when making requests.

This plugin works much like the Insomnia's built-in Prompt plugin but adds some unique features, like asking for specific data type values or formatting those values into several formats.

Example

Installation

Go to the Param plugin page at the Plugin Hub and install the plugin from there.

Additionally, in the Insomnia app go to Preferences > Plugins and install the insomnia-plugin-param.

Usage

Use the Param template tag in requests URLs, headers and bodies. Then click on the tag and customize the parameter with the proper values.

Param Template Tag

Types:

  • 🔤 String, accepts raw strings
  • *️⃣ Password, same as previous but masking the input
  • 🔢 Integer, accepts raw integers
  • ☑️ Boolean, accepts boolean values
  • 📅 Unix timestamp, ask for timestamps and renders them as the number of seconds since the January 1st, 1970.
  • 📅 Unix timestamp with milliseconds, same as above but including milliseconds.
  • 📅 ISO-8601, same as above but format timestamps using the ISO-8601 standard.
  • 🔗 URL, accepts strings that are URLs
  • ✉️ e-mail, accepts e-Mail addresses
  • 🖍 HTML Color, accepts colors and renders the value using the HTML #RRGGBB color format.

Name and description

The Name is an optional but recommendable field that gives the parameter with a representative name of what it stands for. Aditionally you can use the format Name: Description to give the users a better explanation about the purpose of the parameter.

Examples

With no value:

Without name

With Username:

Without name

With Username: Enter here your Github username:

Without name

Control when the dialog is shown:

  • Ask always, always shows an empty dialog
  • Ask always, but suggest the last entered value, same as above but allows the user to reuse/modify the previous value.
  • Ask always, but suggest the default value, same as above but presents the user the initial default value for the parameter.
  • Ask once, and use the value for further requests, shows the dialog once and uses the entered value in the next requests until you close the Insomnia app.

Parameter options

To be implemented