Am I confusing myself here, or should it be possib...
# help
r
Am I confusing myself here, or should it be possible to have a standalone wiremock server in docker (ie. wiremock/wiremock:latest) but then access the admin API using a C# client? Can I use the WireMock.Net.RestClient nuget or does that only work with a WireMock.Net docker service?
l
I don't use WireMock.Net but I have cross posted your question in the #C059E0MBM29 channel. Hopefully @Stef Heyenrath will be able to help
s
@Robbie Wareham The WireMock.Net.RestClient nuget can only be used for WireMock.Net If you want to use a client for connecting to wiremock, you could use the WireMock.Org.RestClient [ but I did not test it lately. so some calls could not work...]
r
@Stef Heyenrath I don't have much experience of RestEase but I don't understand how I include a POST body if the interface doesn't contain a parameter:
Copy code
/// <summary>
    /// Find requests by criteria
    ///
    /// PostAdminRequestsFind (/__admin/requests/find)
    /// </summary>
    [Post("/__admin/requests/find")]
    [Header("Content-Type", "application/json")]
    Task<object> PostAdminRequestsFindAsync();
s
@Robbie Wareham In this case, this method is not yet correctly implemented. Can you check if more methods are missing/invalid? And create an issue here: https://github.com/wiremock/WireMock.Net/issues
s
What I found as a work around was to use the WireMock.Org.Abstractions to build my own classes, then use the API to call the wiremock admin API endpoints. The issue was that there seems to be a bit of a discrepancy between the .Net implementation of Wiremock and the Java implementation used from the docker image.