jreyesr / insomnia-plugin-batch-requests

An Insomnia plugin to repeatedly send a request, each time replacing some data with information from a CSV file, and collecting response data into the CSV file.
https://jreyesr.github.io/posts/insomnia-batch-requests/
MIT License
7 stars 0 forks source link

Read outputs from headers, status code and req time #13

Closed jreyesr closed 3 months ago

jreyesr commented 3 months ago

This PR adds additional data sources for the Outputs, that will be written back to the CSV. Currently, the only source of data is the response body, which must be some form of JSON, and is passed through JSONPath expressions to pick out parts of the data.

Other useful sources of data would be the response headers, since some information may be there too, and the response status code, perhaps for unattended runs where it's important to later know which requests failed to complete.

This was mentioned a long time ago (https://github.com/jreyesr/insomnia-plugin-batch-requests/discussions/3#discussion-4980083), but was never implemented. It was asked again recently on https://github.com/jreyesr/insomnia-plugin-batch-requests/issues/12.


This PR adds another dropdown to the UI where outputs are specified. It controls the source of the data that will be processed via the JSONPath expression:

image

The four options for the new dropdown are: