go-coap
go-coap copied to clipboard
Changed MediaType from byte to int to handle extended vendor type
IETF is specifying MediaType codes beyond 255: https://www.iana.org/assignments/core-parameters/core-parameters.xhtml
As such, the type of the field needs to change to something larger and able to handle the other protocols (such as the OMA-LWM2M vendor codes).
Thanks you @bocajim for the contribution; looks code.
Can you please add a short unit tests that encodes and decodes a message with a Content-Type bigger than 255? (just pick one of those OMA-LWM2M types)