xhr-straming in Gatling is possible?


this is my second question here today, sorry if this is too much!

again, my version is 2.2.5, but we are considering upgrading, so please let me know also if is it possible to do the things I asked for in later versions.

I try to figure out the reason for my Websockets are closing within a couple of seconds from opening, then I realized I’m getting a different type of WebSockets in my service.

-while I’m using JMeter, there is an option to configure transport protocol, so I’m using “xhr-streaming” and my service is getting an object of WebSocket:


The Uri:

also, the handshake headers has 5 keys & values:




user-agent=[Apache-HttpClient/4.5.6 (Java/1.8.0_231)]

, accept-encoding=[gzip,deflate]}

While I am using Gatling, I couldn’t find a way to configure “xhr”, so my service is getting an object of WebSocket:

StandardWebSocketSession[id=189, uri=ws://]

the handshake headers has 10 keys & values:

{accept=[application/json, text/plain, /],

cache-control=[no-cache], pragma=[no-cache],

accept-encoding=[gzip, deflate, sdch],





sec-websocket-version=[13], host=[]}

my questions are:

  1. there is an option to use “xhr-streaming” in Gatling? if so, how?
  2. I tried to configure the Jmeter handshake headers on my open Ws request in Gatling, but “connection” is overrides by Gatling from “keep alive” to “upgrade”, there is an option to control this?
    Thanks and Happy Easter/Passover/Ramadan to you all


I am totally stuck with this. any chance one of you guys can help me with this?

בתאריך יום רביעי, 8 באפריל 2020 בשעה 15:03:53 UTC+3, מאת Maor E:

Hey man,

I am not quite sure why you aren’t upgrading but here’s something to help you with the Web Socket protocol from the Gatling documentation. (I am assuming you wanted to capture web socket traffic)
It is a little bit different from the HTTP protocol but it gets the job done.

Thanks for your kind try.
I already read the documentation thousand times. they never mentioned a thing about XHR or transport options.

בתאריך יום ראשון, 12 באפריל 2020 בשעה 12:13:22 UTC+3, מאת Maor E:

No, Gatling doesn’t support xhr-streaming, which is a legacy technology that was superseded by WebSockets.