I want to encode the correlation value from HTML to URL mode in Neoload.
Response - Rachel,Zane
Request - Rachel%2CZane
Please help me with the Custome Code in variable extractor to conver these values. I have tries the drop HTML and URL and its not working as I am not getting the converted values.
Earlier, I have used custom code to convert URL into HTML mode. Below is the custom code for the same.
function decode(encodedValue) {
var decodedValue = encodedValue;
String.prototype.decodeEscapeSequence = function() {
return this.replace(/\\x([0-9A-Fa-f]{2})/g, function() {
return String.fromCharCode(parseInt(arguments[1], 16));
});
};
decodedValue= decodedValue.decodeEscapeSequence();
return decodedValue;
}
If you need to do an encoding/decoding with Javascript, you can use the W3C API methods 'encodeURIComponent' or 'decodeURIComponent' '(https://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
or https://www.w3schools.com/jsref/jsref_decodeuricomponent.asp)
christophe answered
Gaurav posted a new question