I am using creating an HttpSamplerBase using the HttpSamplerFactory.
I have a JSON body I want to post, so I am adding
sampler.addArgument("", body);
However, this gets encoded, so I debugged the code and found that ALL arguments
created via HttpSamplerBase end up calling setAlwaysEncoded(true), so the JSON
body gets encoded when it's POSTed and there's no nice way to prevent this.
It looks like the only solution, which seems to be sort if how the UI creates
the arguments, is to create a new HttpArgument and set it's attributes and then
do
sampler.getArguments().addArgument(arg);
Is this a built in limitation for some reason? It seems a rather clunky
solution.
Why am I doing it this way - I have a major performance test framework I am
porting to Jmeter and I am implementing it using Java samplers with nested Http
samplers, as it's the simplest way to get this across in a short period of time.
Thanks
Antony