I am using version 2.0.0-M3a and I have to a web service where the a PUT request requires body data, sometimes in JSON and sometimes form URL encoded.
When I try to add .body(…) or .param(…) a compilation error occurs. Is this supported? If so what I am doing wrong from the following.
body error:
exec(http(“request_1”)
.put("/")
.body("""{“test”: “test_value”}""")
)
04:56:14.684 [ERROR] i.g.a.ZincCompiler$ - G:\tools\gatling2\user-files\simulations\cc\PutTest.scala:27: type mismatch;
found : String("{“test”: “test_value”}")
required: io.gatling.http.request.Body
04:56:14.721 [ERROR] i.g.a.ZincCompiler$ - .body("""{“test”: “test_value”}""")
04:56:14.722 [ERROR] i.g.a.ZincCompiler$ - ^
04:56:14.979 [ERROR] i.g.a.ZincCompiler$ - one error found
param error:
exec(http(“request_1”)
.put("/")
.param(""“testparam”"", “”"{“test”: “test_value”}""")
)
05:00:00.414 [ERROR] i.g.a.ZincCompiler$ - G:\tools\gatling2\user-files\simulations\cc\PutTest.scala:27: value param is not a member of io.gatling.http.request.builder.PutHttpRequestBuilder
possible cause: maybe a semicolon is missing before `value param’?
05:00:00.417 [ERROR] i.g.a.ZincCompiler$ - .param(""“testparam”"", “”"{“test”: “test_value”}""")
05:00:00.418 [ERROR] i.g.a.ZincCompiler$ - ^
05:00:00.502 [ERROR] i.g.a.ZincCompiler$ - one error found