How I get original bytes from request? Calling request.body.asBytes()
I get this message:
asBytes() expected list of bytes, instead got List<_InternalLinkedHashMap<String, dynamic>>
I saw that HTTPRequestBody
has the property retainOriginalBytes
to use in this case, but where I set it?
Thanks!
Whatever endpoint you're hitting with your request is returning a Map in its body, not a list of Bytes.
I'm not sure if you can control the contents of what that endpoint is returning but if you can that would be the place to change it.
Check out the BytesBuilder class. Also, read the Aqueduct docs for Request and Response Objects. Hopefully this gets you on the right path!