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
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