Insomnia: [Feature Request] - Run script on directly on Insomnia

Created on 8 Mar 2019  路  4Comments  路  Source: Kong/insomnia

Hello. Is this possible for a feature that you could run script on insomia? Example.
I have to test something at work where I need to notify my fake user account. so i have this body.

{
  "id": "150129",
  "workstep_final": "Completed"
}

i need to change the id for every request. Since I have a hundred sample ID's I was thinking of putting them in an array and make a simple script that automates my request. sorry if im not being clear.

stale

Most helpful comment

This is possible with the Chance plugin.
Install the plugin and use the template tag with "Pick One". Edit the tag (by just clicking on it) and enter the values as an array under Options:

image

Your body in the editor should look like this:
image
Once you make a request a random item from the array is picked. You will be able to see the value in the timeline:
image

All 4 comments

馃憢 Thanks for opening your first issue! If you're reporting a 馃悶 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 馃巵, please provide real
use cases that would benefit. 馃應

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

This is possible with the Chance plugin.
Install the plugin and use the template tag with "Pick One". Edit the tag (by just clicking on it) and enter the values as an array under Options:

image

Your body in the editor should look like this:
image
Once you make a request a random item from the array is picked. You will be able to see the value in the timeline:
image

thank you so much!!! I was thinking of doing a bash script and curl for http. thank you

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings