pact-foundation / pact-stub-server

Standalone pact stub server
MIT License
75 stars 19 forks source link

stub server is not able to do response on base on different payload given to API #10

Closed rgshah78 closed 6 years ago

rgshah78 commented 6 years ago

The stub server returns responses based on the method + path + query parameters. You can raise an issue to get it to have an option to include the request body as well.

I have one API call with different payload and I am expecting different response as per payload values. Eg : API call is url/assets - POST call. I am providing payload as JSON - {"name":"ravi"} , expected response is name as ravi. Now,API call is url/assets - POST call. I am providing payload as JSON - {"name":"shah"} , expected response is name as shah.

Now, Both responses are update via pact interactions into pact-server. But Server doesn't depend on payload value. It is reponding based on first interactions for same API call

uglyog commented 6 years ago

Released 0.0.8 with this fix