mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
While stubbing with same request uri, with different response codes, how to call the endpoints #421
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bhargavjulaganti on GitHub (Jun 10, 2022).
I have a requirement, where my request url is same, but I need to respond back with different http response codes.
Here is the sample code
@StefH commented on GitHub (Jun 10, 2022):
That
guidis just an identification for the mapping. So that you can delete/update that specific mapping via the admin interface.This guid is not used when matching the request.
You need to make sure that call your request application makes is different, else WireMock.Net cannot know which one to return. (Example : you can add an extra query or header parameter to make the difference)
An other possibility is that you define a scenario (https://github.com/WireMock-Net/WireMock.Net/wiki/Scenarios-and-States):
@bhargavjulaganti commented on GitHub (Jun 10, 2022):
Thanks for the update.