Open akomm opened 8 years ago
Why removing the content type ? The listener can simply return null in JSON.
Why should null be returned as JSON when an operation does not return any data? And what do you do with XML? Not every operation on a resource does return data. JSON is only an example.
Well maybe we could add an option but i don't think it should be the default as some people would expect this behavior.
When some routes under ^/api do not return any data, format listener should omit content-type:
application/json
, So it should do for other formats. If there are cases where it would not make any sense, maybe add it as an option, so you can tell to omit content-type if response is empty on specific format format only.