0

I am using jmeter to send a HTTP POST request. the server responds with a chunked http response 200 ok and I need to parse the initial chunk. However jmeter waits for all the response chunks. I tried with the http sampler and http raw request sampler. In both cases the chunks are not parsed individually.

Saranesh
  • 35
  • 3

1 Answers1

0

It can be achieved only by using JSR223 Sampler and custom Groovy scripting (or alternatively writing a brand new JMeter Plugin)

Example code you can use as the basis can be found in How do you read and print a chunked HTTP response using java.net.http as chunks arrive? answer

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • The above sample code works fine when run with Java11. However when i tried to run it from jmeter using a JSR Sampler (groovy compiler), the request is sent but there is not response detected by the code even though the response actually is sent. (could see from wireshark trace). – Saranesh Jul 23 '21 at 10:09