How to specify response headers using json file? #436

Closed
opened 2025-12-29 15:23:47 +01:00 by adam · 2 comments
Owner

Originally created by @rosemaryehlers on GitHub (Aug 17, 2022).

Originally assigned to: @StefH on GitHub.

https://github.com/WireMock-Net/WireMock.Net/wiki/Stubbing
The wiki section on Stubbing shows how to specify headers for a response using code, but not how to specify them if using a json file for configuration. Could that be added? Seems like an oversight in documentation.

Originally created by @rosemaryehlers on GitHub (Aug 17, 2022). Originally assigned to: @StefH on GitHub. https://github.com/WireMock-Net/WireMock.Net/wiki/Stubbing The wiki section on Stubbing shows how to specify headers for a response using code, but not how to specify them if using a json file for configuration. Could that be added? Seems like an oversight in documentation.
adam added the questiondoc labels 2025-12-29 15:23:47 +01:00
adam closed this issue 2025-12-29 15:23:47 +01:00
Author
Owner

@StefH commented on GitHub (Aug 17, 2022):

@rosemaryehlers
I've updated that page.

Please note that when you use the C# mapping, you can always generate the json mappings using the SaveStaticMappings method:
https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Server/WireMockServer.Admin.cs#L112

See also here: Admin-API-Reference

@StefH commented on GitHub (Aug 17, 2022): @rosemaryehlers I've updated that page. Please note that when you use the C# mapping, you can always generate the json mappings using the SaveStaticMappings method: https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Server/WireMockServer.Admin.cs#L112 See also here: [Admin-API-Reference](https://github.com/WireMock-Net/WireMock.Net/wiki/Admin-API-Reference)
Author
Owner

@rosemaryehlers commented on GitHub (Aug 19, 2022):

Thank you!

@rosemaryehlers commented on GitHub (Aug 19, 2022): Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#436