If I change the content-type from application/cbor
into application/octet-stream
then the test program is working as expected (ie. the buffer send is also received as a buffer).
Moreover this change also fixed the issue when sending data to edge impulse (http://ingestion.edgeimpulse.com/api/training/data).