I have a POST sub-resource at the moment which consumes application/json
and has a payload that is a custom POJO.
I have the need to make that payload optional. I can of course specify a
payload of {} but that is not what I want. I would like my user to be able
to invoke the method without a payload at all. I created a new method with
an identical @Path annotation but a different method signature which did
not do what I wanted, it still routed to the method with the POJO payload,
which of course failed deserialization with EOF because there was no
payload.
Jersey has something called an EntityHolder<CustomType> for this purpose
but I could not find a Wing analog to this.
Any help would be appreciated.