I'm trying to send HTTP request with binary content using JMeter. In the documentation I found that I can send file with binary content. I think this is not a good solution for my need, since every request has its own binary content.
Here is an example of a client I wrote in Perl that demonstrates what I tried to accomplish:
$date_time = sprintf "%08X", time();
$BODY_TEMPLATE = "00${date_time}0015";
$body_len = (length (sprintf($BODY_TEMPLATE,0,0))) / 2;
# Here I set $TARGET & $HOST
$MSG_HEADER = "POST \/unil?URL=${TARGET} HTTP\/1.1\r\nHost: ${HOST}\r\ncontent-type:application/binary\r\ncontent-length: ${body_len}\r\n\r\n";
$body = pack ("H*", $BODY_TEMPLATE);
$message_to_send = $MSG_HEADER . $body;
# at this point I sent the entire message over a TCP socket I previously opened.
Any Ideas? Thanks, Yuval