Tanganelli / CoAPthon3

CoAPthon3 is a porting to python3 of my CoAPthon library. CoAPthon3 is a python3 library to the CoAP protocol compliant with the RFC. Branch is available for the Twisted framework.
MIT License
58 stars 50 forks source link

Get binary response from server in Client #21

Open MartinEnders opened 5 years ago

MartinEnders commented 5 years ago

Hello Giacomo Tanganelli,

To receive binary data from the CoAP Server it can only be sent with content_type application/octet-stream other content types like application/cbor can be used within the server but are not recognized as binary from the client.

I think the following line has to be modified: https://github.com/Tanganelli/CoAPthon3/blob/master/coapthon/serializer.py#L117

Currently the payload of the response from the server is only treated as as binary when the content type is set to application/octet-stream. Maybe you could extend this to application/cbor

Best Regards Martin