Answered question

How could I encode or decode a url?

I have a specific requirement of my scenario where I need to extract a value. This value is extracted in decoded format but I need to use it on text POST request in both formats, decoded and encoded. This can probably be done through a javascript but I don't know how to do it. Could you help me with any other options?

NeoLoad is able to automatically encode or decode a value using the url encoding. This settings is detected during the record.

In some situation, you have to use a javascript to do the same thing. If you have to encode or decode a url within a javascript, you can use this syntax in NeoLoad:


var myVar = encodeURIComponent("My text to encode");

 

For more information, see "NeoLoad Javascript API" in Neoload documentation.

Did you find this useful ?

No (2)

Yes (1)

33%

33% of users found this answer useful