Closed sir-farfan closed 1 month ago
It is also possible to store the file in a variable using the import syntax. The file is then read in as a string.
@foo={{< ./requestBodyImport.json}}
If you want to read the file yourself using Javascript, the easiest way is to use the methods provided by NodeJS directly (see https://nodejs.org/api/fs.html#filehandlereadfileoptions)
Hello
I know I can read the contents of a file and use them as body with
<@ ./requestBodyImport.json
But, is there a similar shortcut to read the file into an exported variable in order to use it multiple times for different tests?