Maarten Aerts

05/17/2023, 1:54 PM
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( .willReturn(WireMock.notFound())); wiremock.stubFor( .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?

Oleg Nenashev

05/17/2023, 2:39 PM
Indeed, WireMock will always return empty body. For me this use-cases rather seems like an RFE. Could you please file one on ?