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.
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 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:
The four options for the new dropdown are:
From body: the rightmost text field is interpreted as a JSONPath expression and evaluated against the JSON response body. Default value, it works like previous versions
From header: the rightmost text field is interpreted as a header name (case-insensitive, AKA the case does not matter). The header's entire value is the result of this output
Status code: the rightmost text field is hidden. The numerical status code (e.g. 200, 404) is the result of this output
Request time (millis): the rightmost text field is hidden. The time taken by this request (e.g. 123.456) is the result of this output
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:
The four options for the new dropdown are: