Jump to content
WAPT Forum

sergei

Administrators
  • Content Count

    718
  • Joined

  • Last visited

Posts posted by sergei


  1. Hi,

    You have to use the JavaScript operator to read a content from the file. Add to the operator something like the following:

    var fso,filehandle,contents;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    filehandle = fso.OpenTextFile("D:\\Temp\\WAPT\\5.0 Test\\JSONFromFile\\json.txt",1);
    contents = filehandle.ReadAll();
    log.message(contents);
    context.variable("test") = contents;
    filehandle.close();

    Then use the variable "test" in a POST request body.

×
×
  • Create New...