fabric8io / mockwebserver

An extension of okhttp's mockwebserver, that provides a DSL and is easier to use
Apache License 2.0
113 stars 38 forks source link

Expect with parameter? #50

Open membersound opened 4 years ago

membersound commented 4 years ago

Could you enhance .expect() with a parameter? Maybe with the use of RequestMatcher?

server.expect(RequestMatcher... matcher).withPath("/api/v1/users").andReturn(200, "admin");

So it could be possible to return results based on the send request (especially important when multiple async requests are send to the mockWebServer).

rohanKanojia commented 4 years ago

@membersound : Would you like to create a PR to add this feature?