mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Error thrown when calling mocked endpoint second time when using file-based response body #190
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 @rwwilden on GitHub (Jul 22, 2019).
When you use a setup as follows:
the mocked endpoint can only be called successfully the first time. Second time it will throw an error.
This is caused by the fact that the property
BodyData.BodyAsFileis set tonullright after the first successful response, causing anArgumentNullExceptionthe second time. This happens in theResponseclass.@StefH commented on GitHub (Jul 22, 2019):
Dankjewel.