2
votes

I'm using JMeter 2.10. I'm looking for a way to send a binary POST body (Protobuf payload) with HTTP Request. To be clear - I'm not uploading a file. Maybe there is a way to encode byte codes in Body Data textarea?

Thanks in advance!

3

3 Answers

1
votes

Try HTTP Raw Request sampler in JMeter plugin: http://jmeter-plugins.org/wiki/RawRequest/. You can get it via extra set of JMeter plugin: http://jmeter-plugins.org/wiki/ExtrasSet/

0
votes

If I'm correctly getting your question and you need the data to be URL-encoded prior to being sent you can wrap your binary data into __urlencode function

${__urlencode(A string containing weird characters like @ & * # and ")}

POST http://example.com/

POST data:
A+string+containing+weird+characters+like+%40+%26+*+%23+and+%22

Alternatively you can use any suitable pre-processor. The most powerful of them is Beanshell which provides full access to JMeter context and engine and allows to execute arbitrary Beanshell (Java) code.

-4
votes

JMeter is also support the Protocol-buffers. You just need to add the contentType = application/octet-stream in HTTP Header Manager.

enter image description here

Thanks. Atif Mehar