mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Getting all currently registered stub mappings #12
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 @StefH on GitHub (Jan 19, 2017).
Originally assigned to: @StefH on GitHub.
@gregoks commented on GitHub (Jul 15, 2019):
Hi,
I was wondering if this is implemented? Because I see now that RequestMatchers in RequestMessageCompositeMatcher class is private. So is there a way we can get the instance of all registered mappings like we see them in the admin API?
Thx,
Greg
@StefH commented on GitHub (Jul 15, 2019):
Hello Greg; you can just access
Mappings?Like
12444cc11e/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs (L102)@gregoks commented on GitHub (Jul 15, 2019):
Yeah but its an interface of IMapping, I want to be able to serialize it and send it as an object over http. Thats why I need the mapping info like path, request matchers, response etc as properties.
@StefH commented on GitHub (Jul 15, 2019):
You know you can just do a GET request to the
/__admin/mappingsto get all mappings?@gregoks commented on GitHub (Jul 15, 2019):
Yeah I know but since I have the server object in memory, I was wondering if I could get the mappings the same way as I can get LogEntries without the need of extra http call
@StefH commented on GitHub (Jul 15, 2019):
I see, can you create a new issue?
@StefH commented on GitHub (Jul 16, 2019):
https://github.com/WireMock-Net/WireMock.Net/pull/298
@gregoks commented on GitHub (Jul 16, 2019):
Thanks @StefH for the quick response! Not sure if you still need it but I have created a new issue: https://github.com/WireMock-Net/WireMock.Net/issues/299