I want to match a POST request with application/x-www-form-urlencoded data like:
grant_type=password&username=test&password=pwd
I tried:
"response": {
"status": 200,
"bodyPatterns": [ {
"matches": ".username=(test)&."
}
],
. . .
But I get a 500 error?
Is it possible to just match on plain text ? (So no JSON and no XML) matching?
See also this http://stackoverflow.com/questions/41279540/request-body-matching-in-wiremock-not-json-xml
Sorry my bad, I need to put the bodyPatterns in the request:
{
"request": {
"method": "POST",
"url": "/authorize/oauth2/token",
"bodyPatterns": [ {
"matches": ".username=(test)&."
}
]
},
"response": {
"status": 200,
. . .
Closing
Most helpful comment
Sorry my bad, I need to put the bodyPatterns in the request: