I am new to wiremock , I am trying to setup a stub for a get request which looks like /details?employee-info={“name”:”rahul”}
I tried below stub but got exception
Stub:
{ "request": { "method": "GET", "urlPathPattern": "/details", "queryParameters": { "query-param": { "equalTo": "{"\name":"rahul"}"
}
},
"response": {
"status": 200,
"bodyFileName": "emplyeeDetails/rahul",
"headers": {
"Content-Type": "application/json"
}
}
}
}
Exception: java.lang.IllegalArgumentException: Invalid character found in the request target [/details?employee-info={%22name%22:%22rahul%22}].
Please help, many thanks in advance.