Generate a form-data file from response

My question:

I want to store a response body as a CSV to upload as a form-data file in another request.

Given I have the following response body in text/csv:

code,name
test123,potato

I would like to store this response as a CSV file and upload this file in the next request as a form-data file value.

To be clear we want to avoid having a .csv locally and mimic uploading a file using Postman. Is this possible?

I’ve already tried:
I watched Valentin’s video on how to read and write results to a CSV, but this is a bit over-engineered for what we want to accomplish - although it does technically solve this problem.

1 Like