Question about couple server methods. #315

Closed
opened 2025-12-29 15:20:28 +01:00 by adam · 3 comments
Owner

Originally created by @tomatualus on GitHub (Nov 23, 2020).

Hey. I would love to know what do some of the WireMockServer methods do. Also would be nice to add this info to the wiki. :)

AddCatchAllMapping
ReadStaticMappings - Does this force the server to read all the mappings? When does the server read the mappings otherwise, if not called?
ReadStaticMappingAndAddOrUpdate - Add or update what? Mappings?
WithMapping (string mappings overload) - JObject serialized or what is this supposed to be?
WithMapping (params MappingModel[] mapings overload) - I guess i can register new mappings with this?

Thanks in advance, really love your work.

Originally created by @tomatualus on GitHub (Nov 23, 2020). Hey. I would love to know what do some of the `WireMockServer` methods do. Also would be nice to add this info to the wiki. :) AddCatchAllMapping ReadStaticMappings - Does this force the server to read all the mappings? When does the server read the mappings otherwise, if not called? ReadStaticMappingAndAddOrUpdate - Add or update what? Mappings? WithMapping (string mappings overload) - JObject serialized or what is this supposed to be? WithMapping (params MappingModel[] mapings overload) - I guess i can register new mappings with this? Thanks in advance, really love your work.
adam added the question label 2025-12-29 15:20:28 +01:00
adam closed this issue 2025-12-29 15:20:28 +01:00
Author
Owner

@StefH commented on GitHub (Nov 24, 2020):

Hello @tomatualus
I did add some more comments in https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs

Please take a look.

@StefH commented on GitHub (Nov 24, 2020): Hello @tomatualus I did add some more comments in https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs Please take a look.
Author
Owner

@tomatualus commented on GitHub (Nov 24, 2020):

Thanks for the reply, @StefH !
All of the things got a lot clearer now. Is AddCatchAllMapping called by default? Because that's the thing i always see, but don't remember every calling .AddCatchAllMapping.

@tomatualus commented on GitHub (Nov 24, 2020): Thanks for the reply, @StefH ! All of the things got a lot clearer now. Is AddCatchAllMapping called by default? Because that's the thing i always see, but don't remember every calling .AddCatchAllMapping.
Author
Owner

@StefH commented on GitHub (Nov 24, 2020):

The AddCatchAllMapping is a method which you can use (however actually I forgot why I added this method)

The 404 you see, is created in a different part --> that's the default error when a mapping is not found.

@StefH commented on GitHub (Nov 24, 2020): The `AddCatchAllMapping` is a method which you can use (however actually I forgot why I added this method) The 404 you see, is created in a different part --> that's the default error when a mapping is not found.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#315