How to send a batch file with the content being the body of the request

Hi to the community,

I have several files that contain the body of my request.
I thought of using the runner to load each file. But I don’t know how to put the file content in the body.

Do you have any idea how to do it ?
Thanks for your help.

Hi @lunar-module-cosmol2

Try this;

Create a CSV with your data;

Add the variable name from the CSV into your request body;

Run in collection runner and select your CSV file;

The value should be shown in console like so;

Thank you for your help.
I tested the proposed solution but I can’t load the csv because of the data.

I have the following error :
This error is removed when I drop the quotation marks ( " => " ) but server gets an error

In your CSV, escape the double quote with a second double quote, like this;

I forgot this specification.
It’s good and it works well after to escape double quote.

1 Like