so I have a large file which I need manipulate to generate some jsons as load. We also compress the request before send out, so the current code looks like the following and it works.
.feed(MyFeeder)
.tryMax(10, “retry”) {
pause(session=>calcPause(session(“retry”).as[Int]))
exec(
http(“Create”)
.post("/someObject")
.headers(httpHeaders)
.body(StringBody("${payload}"))
.processRequestBody(gzipBody)
.check(status.is(200))
)
}.exitHereIfFailed
Now, We want to chunk the request, since I want to send very large amount of jsons as one request, I wonder if the following code does the trick?
.feed(MyFeeder)
.tryMax(10, “retry”) {
pause(session=>calcPause(session(“retry”).as[Int]))
exec(
http(“Create”)
.post("/someObject")
.headers(httpHeaders)
.body(StringBody("${payload}"))
.processRequestBody(gzipBody)
.processRequestBody(streamBody)
.check(status.is(200))
)
}.exitHereIfFailed
Liang