0

I have a .xml file in external files and I want to parameterize a field. I am not able to do it directly. Is there any way we can parameterize the field? So I have a vugen script:

web_custom_request("getInfo", "METHOD = POST",
"URL = "https://someurl.com",
"BodyfilePath=payload.xml",
LAST);
bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • So you want to open a file stream (fopen, fread, fclose...) before the web request, parameterize the field, write the file and send it then in the request body? – twinge Nov 26 '21 at 14:04

1 Answers1

0

This example might help

PCODE

char myxmlbuffer[512]="<yadayada>
       <aa>blah</aa>
       <bb>woof</bb>
       <cc>yabbadabbadoo</cc>
       <dd>{MyLoadRunnerParameter}</dd>
     </yadayada>";


lr_save_string("giggity","MyLoadRunnerParameter" );
lr_message("print this %s",
    lr_eval_string(myxmlbuffer) );
James Pulley
  • 5,606
  • 1
  • 14
  • 14