Help with Post Requests

Hi,
I have a scenario, where feeder reads the csv file.
after each record is pulled out of the feader , i will have to fire off a series of requests based on content of each row
csv looks like
criteria,type
a b c , typea
a b c d e , typeb

val feed2 = csv(inpyt.csv)
val se = feed(feed2).exec (http(“req)
.post (”/api")
.body(StringBody(${criteria}))

for each record in feed, i would have to split by " "[space] and fireoff a series of requests.
any help pointers would be appreciated.

Hi,

The easiest way to do that is to convert to column content on the feeder spot: http://gatling.io/docs/2.1.5/session/feeder.html#converting

val feed2 = csv(inpyt.csv).convert { case (“criteria”, string) => string.spit(" ") }

Then, you can have each virtual user iterate over its sequence of criterion: http://gatling.io/docs/2.1.5/general/scenario.html#foreach

foreach("${criteria}", “criterion”) {

}