-
Notifications
You must be signed in to change notification settings - Fork 90
Description
I need to write a custom MessageBodyReader (and MessageBodyWriter, this already works) to handle the TBytes type, such that this particular dynamic array type would be treated as a byte stream. This gives the ability to pass/return TBytes to/from a resource declared as consuming/producing a TMediaType.APPLICATION_OCTET_STREAM, without the need to create and having to deal with TMemoryStream (which seems to be the only currently/natively supported type when consuming/producing TMediaType.APPLICATION_OCTET_STREAM).
In reference to the following TODO:
| // TODO: Modify, try first GetObjectFromParam (to rename!) and then GetSimpleParam |
The current code actually inhibits the ability to write such a custom MessageBodyReader for the TBytes type, which is a dynamic array and these are treated by special code that doesn't use the MessageBodyReader registry. Solving this TODO would probably solve my issue (well, I tried and it actually solves it, but I can't foresee the drawbacks).