Hello Team, I have a API that calls 3 different do...
# help
d
Hello Team, I have a API that calls 3 different downstream services and I have configured mock proxy server for those 3 downstream service with the below header content in the mock . I will be able to pass only one header from the client to the API. For example if I pass , x-contract-group = CP,PP,DP and x-contract-test = userP,userK,userC and is there a way to tell mock that if the subs has the header x-contract-group = CP and x-contract-test = userP then fetch the stubs from mock server 1. Basically I'm looking for pattern matcher in Wiremock.
Copy code
Mock Server 1

     "headers" : {
      "x-contract-group" : {
        "equalTo" : "CP",
        "caseInsensitive" : false
      },
      "x-contract-test" : {
        "equalTo" : "userP",
        "caseInsensitive" : false
      }
    }

Mock Server 2
     "headers" : {
      "X-contract-group" : {
        "equalTo" : "PP",
        "caseInsensitive" : false
      },
      "x-contract-test" : {
        "equalTo" : "userK",
        "caseInsensitive" : false
      }
    }

Mock Server 3
     "headers" : {
      "x-contract-group" : {
        "equalTo" : "DP",
        "caseInsensitive" : false
      },
      "x-contract-test" : {
        "equalTo" : "userC",
        "caseInsensitive" : false
      }
    }