convert correlated value from url to html mode

Hi Team,

Please help in converting a string from URL to HTML mode in gatling.

I have the following string that got captured from headers/cookies, which has to be passed as header in other requests in html format.

Which function should i use to convert?


Thanks & Regards,
Srinivas M

No idea what kind of encoding this is.

Hi Stephane,

Sorry if I am not clear on my request.

Just have to decode the URL format. like below




I used to convert.

So, checking if we have any function or code available in Gatling.

Thanks & Regards,
Srinivas M


Hi Stephane,

Thank you.

Tried this .header(“Authorization”,“OAuth ${OAUTHID}”)) and .header(“Authorization”,“OAuth ${OAUTHID}”, “UTF-8”)), no luck the value is still passing in encoded form.

    .put(upluri + "/uploadSession?UploadFlow=guf&Src=TST&redEye=true&autoRotate=true&colorCorrect=true&ImageCompression=Y&AlbumCaptionUTF8=album%2006/09/2020&AlbumDate=1591672571886")
  .header("Authorization","OAuth ${OAUTHID}"))
      .header("Accept", "application/json")


Any other suggestions.

Thanks & Regards,
Srinivas M

Don’t use Gatling EL Strings in random places and expect them to magically work.

This Expression Language only works on String values being passed to Gatling DSL methods.

If you want to bring your own code, you have to stick to code and use the Session API.

Sorry, I was new to this tool and syntax. Will try and let you know.

Thanks a lot.

Thanks & Regards,
Srinivas M

Hi Stephane,

This one worked.

.header(“Authorization”, session => session(“OAUTHID”).validate[String].map(URLDecoder.decode))

Thanks & Regards,
Srinivas M

Exactly! :clap: