Hi, I am trying to mock a response without a body,...
# help
m
Hi, I am trying to mock a response without a body, but wiremock seems to always be responding with an empty body. I have tried wiremock.stubFor(WireMock.post(WireMock.urlPathEqualTo(url)) .willReturn(WireMock.notFound())); wiremock.stubFor(WireMock.post(WireMock.urlPathEqualTo(url)) .willReturn(WireMock.notFound().withBody((byte[]) null))); In latest stable and beta versions. I am using wiremock in combination with the openfeign client. The openfeign client has a distinction between empty/no body. But there is no way to get in to the no body scenario. Anyone know a way to achieve a response without a body?
o
Indeed, WireMock will always return empty body. For me this use-cases rather seems like an RFE. Could you please file one on https://github.com/wiremock/wiremock/issues ?