Open vdespa opened 4 years ago
I agree - requiring that users modify the system under test to send these headers is sub-optimal and risks introducing further bugs.
I agree. I'd say that this should be either handled by the matching algorithm or configurable in the Mock Server creation setup. E.g.: When create a Mock Server flagged to match body request by default and no need to send the x-mock-match-request-body
in the request. Same for headers...etc.
+1, should not change the request header. The reason is as my last comment on #10970
Describe the bug While I am very happy that the Postman Mock functionality has been improved, I would still like to raise awareness about something I consider to be an anti-pattern.
To Reproduce Currently, to get a specific behavior, you are forced to add some headers, like "x-mock-match-request-body" to match the body.
Other examples:
x-mock-response-name
x-mock-response-id
x-mock-response-code
x-mock-match-request-headers
Any configurations you be stored within the mock server and configured from the UI, not from headers.
I don't think it is a good idea to modify the requests that the client sends (even if it is just a header). Ideally, I should be able to switch the server with a mock server and not change the request at all.
Expected behavior No mock headers should be required and the matching algorithm should try to find the closest match.
The request should remain the same.