I have a http POST request with JSON payload to search for devices owned by a customer with this body data:
{
"@rpc": "1.0",
"@data": [
"dev%25",
[
"CompanyXYZ"
]
]
}
It should return a list of devices that begin with 'dev' like this:
device1
device2
device3
But instead is returning nothing. My header has:
How can I search for a set of data using a wildcard character like % in the body data of my HTTP Request? It seems like that is what I am seeing the endpoint do in our webapp.
I have tried these things with no luck:
I even tried the endpoint with just "dev%" and not "dev%25" but it is not encoding the % correctly and throws:
jmeter.protocol.http.visualizers.RequestViewHTTP: Error decoding query, maybe your request parameters should be encoded:
{
"@rpc": "1.0",
"@data": [
"dev%",
[
"CompanyXYZ"
]
]
} java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "","
at java.net.URLDecoder.decode(Unknown Source)
I don't see any problems using JMeter 3.1
JSON request is set in Body Data tab of the HTTP Request sampler
See Testing SOAP/REST Web Services Using JMeter for comprehensive information on various aspects of API testing with JMeter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.