mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
AdminApiMappingBuilder do not expose WithHeader for Request #695
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 @scrocquesel-ml150 on GitHub (Jun 4, 2025).
Originally assigned to: @StefH on GitHub.
I'm using
WireMock.Net.Testcontainers1.8.9, and I want to match a request on a header like this sample. But WithHeader doesn't exist.The following code do not compile.
I have to add the package
WireMock.Net.Sharedto gain access toMatchBehaviourbut it is not enough.error CS1061: 'RequestModelBuilder' does not contain a definition for 'WithHeader' and no accessible extension method 'WithHeader' accepting a first argument of type 'RequestModelBuilder' could be found (are you missing a using directive or an assembly reference?)@StefH commented on GitHub (Jun 4, 2025):
@scrocquesel-ml150
The convience-method
WithHeaderdoes not yet exists, for now you can use:@StefH commented on GitHub (Jun 4, 2025):
https://github.com/wiremock/WireMock.Net/pull/1306
@scrocquesel-ml150 commented on GitHub (Jun 5, 2025):
Thank you. I don't know why but autocompletion didn't work properly and it was hard to guess the correct methods without the generated code source available.