How to do split operation in queryparams???

Hi,

I am new to gatling…Can any one plz help me how to do split operation in queryparam???

my requirement is like this…

I am getting the username and password from csv file so for login i used ${username} and user name is user0@abc.com…and for post request I have to post only user0.
so I decided to do split operation…But how to do that operation inside queryparam…or is any other way for that…plz tell me with example…

Thanks

You can’t do the split inside of the queryparam. You will need to split it in logic outside of the http() request.

Example code:

`
feed( csv( “source.csv” ).circular )
.exec( session => {
val email = session(“email”).as[String]
session.set(“username”, email.substring(0, email.indexOf("@") ) )
})
.exec( http( DESC ).get( URL ).queryparam( “user”, “${username}” ) )

`

Make sense?

Thanks John…I will try

Thanks john…It works fine…