.acceptHeader(“X-Auth-Token: c965d57a8bf285971e09bfb4a010710025dbe7a2-pa.u.exp=1563651221084&pa.p.id=password&t.id=john&pa.u.id=admin%40abc.com”)
This is wrong, what you’re doing will generate
Accept:“X-Auth-Token: c965d57a8bf285971e09bfb4a010710025dbe7a2-pa.u.exp=1563651221084&pa.p.id=password&t.id=john&pa.u.id=admin%40abc.com”
See https://gatling.io/docs/current/http/http_request/#headers
Thanks for the immediate reply Stephane!
`
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class WebSockets extends Simulation {
val httpConf = http
.baseUrl("[http://x.x.x.x:9080/v2.0/api/id/john/ws](http://x.x.x.x:9080/v2.0/api/id/john/ws)")
.header("X-Auth-Token","c965d57a8bf285971e09bfb4a010710025dbe7a2-pa.u.exp=1563651221084&[pa.p.id](http://pa.p.id)=password&[t.id](http://t.id)=john&[pa.u.id](http://pa.u.id)=admin%[40abc.com](http://40abc.com)")
.wsBaseUrl("ws://x.x.x.x:9080/v2.0/api/id/john/ws")
val scn = scenario("LOAD TESTING")
.exec(ws("Connect WS").connect("
ws://x.x.x.x:9080/v2.0/api/id/john/ws"))
.exec(ws("Close WS").close)
setUp(scn.inject(atOnceUsers(10))).protocols(httpConf)
}
`
Above worked.
I am not sure what would .acceptheader according to https://gatling.io/docs/3.1/http/websocket/#example would do?
Thanks