0
votes

I need to pass charsets in a string, like '=' '/' '@' using "Send Parameters With the Request" from JMeter 5.1 HttpRequest

I try used "RegEx User Parameters" with "Regular Expression Extractor" Using several custom functions like __BeanShell(URLDecoder.decode), __unescapeHtml, __urldecode Decode using "BeanShell PreProcessor" and "JSR223 PostProcessor"
I've searched a lot off manuals and I haven't found the correct answer If I used variables I have the same result

${__BeanShell(URLDecoder.decode("[email protected]"))}
${__unescapeHtml([email protected])}                    
${__urldecode([email protected])}  // application/x-www-form-urlencoded -- UTF-8
${__urldecode("[email protected]")}  //UTF-8

I expected the request body authenticity_token=LzRkqB3M5tXWXZq1axsb9gkhCx3GIAn588RMIkzpRAHqNCkAlCIwMk8pu9jn68Oy1mylI6W/J4AGoE+t1xT15A==&[email protected]

But the actual is
authenticity_token=LzRkqB3M5tXWXZq1axsb9gkhCx3GIAn588RMIkzpRAHqNCkAlCIwMk8pu9jn68Oy1mylI6W%2FJ4AGoE+t1xT15A%3D%3D&email=correo%40yopmail.com

It changes

  • = to %3D
  • @ to %40
  • / to %2F
1
Welcome to SE. Please consider formatting your question accordingly so it is easy to read and understand. Please see here minimal-reproducible-example I'm not sure you will get much help as is.Jamie Marshall
Thanks, I tryed. Please tell me if its betterM del Milagro Gonzlez Villalob

1 Answers

0
votes

Uncheck checkbox "URL Encode" to avoid encoding under Parameters tab.

For more ref:-https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request

Send Parameters With the Request

The query string will be generated from the list of parameters you provide. Each parameter has a name and value, the options to encode the parameter, and an option to include or exclude an equals sign (some applications don't expect an equals sign when the value is the empty string). The query string will be generated in the correct fashion, depending on the choice of "Method" you made (i.e. if you chose GET or DELETE, the query string will be appended to the URL, if POST or PUT, then it will be sent separately). Also, if you are sending a file using a multipart form, the query string will be created using the multipart form specifications. See below for some further information on parameter handling. Additionally, you can specify whether each parameter should be URL encoded. If you are not sure what this means, it is probably best to select it. If your values contain characters such as the following then encoding is usually required.:

ASCII Control Chars Non-ASCII characters Reserved characters:URLs use some characters for special use in defining their syntax. When these characters are not used in their special role inside a URL, they need to be encoded, example : '$', '&', '+', ',' , '/', ':', ';', '=', '?', '@' Unsafe characters: Some characters present the possibility of being misunderstood within URLs for various reasons. These characters should also always be encoded, example : ' ', '<', '>', '#', '%', …

Output without using encoding enter image description here

Hope this helps.