Closed mcopjan closed 3 years ago
I found the answer https://github.com/WireMock-Net/WireMock.Net/issues/588 meaning I won't be able to use this from .Net project
I found the answer WireMock-Net/WireMock.Net#588 meaning I won't be able to use this from .Net project
Hi @mcopjan ! Thanks for the question. If I got it right you can't use WireMock.Net client library but you still can interact with the Wiremock API directly through the regular HTTP client.
@Adven27 that's right, I could not use the mentioned library because for some reason it uses a custom WireMock model which is not in line with the one from Wiremock.org (the one being used by this project as well). I used NSwag and WireMock openAPI spec from http://wiremock.org/assets/js/wiremock-admin-api.json and generated c# client hence I can communicate with your solution and get/set stubs which is what I needed.
Hi, let's say I don't want to add mappings on start of the docker container by using "-v $(pwd)/example/wiremock:/wiremock" but i would rather add mappings dynamically from code.
I have a wiremock server running on localhost:8888, if I hit http://localhost:8888/__admin/mappings from my browser I can see there are no mappings
{ "mappings" : [ ], "meta" : { "total" : 0 } }
I would like to add some mappings now so I am using the following code (first I am trying to fetch existing mappings expecting an empty list)
The above code fails on
csproj details
I tried other methods such as GetSettingsAsync() with the same result. What I am missing here please? The documentation says, it uses wrapper around Wiremock server so I assume WireMock.Net.RestClient should work?
Thanks for clarification in advance.