On Sat, 20 Jul 2019 19:34:20 GMT, Vijay Nayar wrote:
On Sat, 20 Jul 2019 19:16:42 GMT, Vijay Nayar wrote:
According to the documentation for the
@afterUDA, we have the following:
For reference, the same error also happens when using
registerRestInterfaceas well in
vibe.web.rest, just it happens in different code.
The errors themselves can be worked around by simply turning off the
--vverbose option, so it is not a blocking bug.
For a better illustration of the use case, I have included a demonstration of how arbitrary MediaType conversions can be implemented on top of Vibe.d.
This case is relatively simple, but there are many use cases that can be built up using this code in slightly different ways. For example:
- Having a controller support two mediatypes, e.g. using Protobuf for efficiency in service communication, but still support JSON for debugging.
- Providing data that is not JSON in a consistent way, e.g. having some endpoints produce pictures, PDFs, CSV, etc.