mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
How to specify response headers using json file? #436
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 @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.
@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
@rosemaryehlers commented on GitHub (Aug 19, 2022):
Thank you!