This message was deleted.
# help
s
This message was deleted.
d
haven't tried it, but maybe it helps finding a way: To match a form, you should use
formParameters
:
Copy code
"formParameters": {
      "tool": {
        "equalTo": "WireMock"
      }
    }
I don't know whether there is a matcher for `exists`/`doesNotExist` but you may be able mimic this with `doesNotMatch`:
Copy code
"formParameters": {
      "code": {
        "doesNotMatch": ".+"
      }
    }
j
I tested using this way:
Copy code
"form parameters": {
        "code": {
          "doesNotMatch": ".+"
        }
      }
I don't know if I did something wrong: but I'm getting the following error:
Unrecognized field "formParameters" (class com.github.tomakehurst.wiremock.matching.RequestPattern), not marked as ignorable
a
Copy code
"formParameters": {
      "grant_type": {
        "equalTo": "authorization_code"
      },
      "code": {
        "absent": true
      }
    }
Should work
@Julio Marvim What version of WireMock are you using? I think
formParameters
is only in Wiremock 3 and above
j
I got it this way:
Copy code
"formParameters": {
      "grant_type": {
        "equalTo": "authorization_code"
      },
      "code": {
        "absent": true
      }
    }
But I needed to update the version of the wiremock I was using to the latest version available. Thank you very much.
🎉 1