Thank you. The preproccesor works. > -----Original Message----- > From: glin...@live.com <glin...@live.com> > Sent: Wednesday, January 27, 2021 11:44 AM > To: jmeter-u...@jakarta.apache.org > Subject: Re: Can't override Connection header > > I don't think you can do this using HTTP Header Manager, the header is > controllable via "Use KeepAlive" box in HTTP Request sampler > > If you need to parameterize the Connection header I can think of adding > JSR223 PreProcessor > <https://jmeter.apache.org/usermanual/component_reference.html#JSR22 > 3_PreProcessor> > and using the following code: > > > > sampler.setUseKeepAlive(false) // for Connection: close > > or > > > > sampler.setUseKeepAlive(true) // for Connection: keep-alive > > > Alternative option would be switching to HTTP Raw Request sampler > <https://www.blazemeter.com/blog/the-jmeter-http-raw-request-sampler- > when-and-how-to-use-it> > which gives you full flexibility in building request headers and body > > > > -- > Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org > For additional commands, e-mail: user-h...@jmeter.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org