shamblett / coap

A Coap package for dart
Other
16 stars 13 forks source link

refactor!: use enhanced enum for ContentMediaType #106

Closed JKRhb closed 1 year ago

JKRhb commented 2 years ago

This reworks the Content-Format registry as an enhanced enum and adds the missing values from the IANA CoAP Content-Formats registry, also supporting those with parameters and encoding values.

CC @JosefWN

JKRhb commented 2 years ago

Note that I removed the fileExtension field here as Content-Formats can have multiple file extensions and keeping track of all possible extensions seemed a bit tedious to me, while not being sure if it has that much value for the users. If you think we should keep the extension, we could add them back in, though (maybe in that case as a list).

JosefWN commented 2 years ago

LGTM, just a minor remark.