I`m using j meter for load testing where I have to call upload Image API through http request and to achieve this I have to convert an image into compressed byte array to se
Yes, I follow this method "add a Beanshell Pre Processor to your HTTP Request", and successful.
For my case, I also add a "HTTP Header Manager", specify: "Content-Encoding:gzip", "Content-Type:"application/x-www-form-urlencoded", "Accept:/". And, set String encoding by: vars.put("binaryData", new String(binThrift, "ISO-8859-1"));
HTTP Header Manager
Beanshell Pre Processor
HTTP Request
Real Request