Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
if (bsh.args[0].equalsIgnoreCase("StopThread")) {
    log.info("Stop Thread detected!");
    SampleResult.StopThread(bsh.args[1]);
}
return "Data from sample with Label "+Label;

With the following code you can access the HttpRequest body and modify it:

No Format

sampler = ctx.getCurrentSampler ();
args = sampler.getProperty ("HTTPsampler.Arguments");
httpArg = args.getObjectValue ().getArguments ().get (0);
body = httpArg.getObjectValue ().getProperty ("Argument.value").getStringValue ();