Encoding content
Encoding content in HTTP is relatively easy, but decoding is complicated. Since it is easy to encode and provide a content type string, the decoder needs to be very flexible to support all the content types that might be used, including all the individual variants, character encodings, and so on. You can even create proprietary and vendor-specific encodings very easily.
CoAP has reversed these relationships. In CoAP, it is more complicated to encode the content you want to transfer, but this makes it much easier for the receiving end, who need to decode the information. Only of few of all available Internet Content Types, or Media Types, are possible to encode in CoAP. Fewer options means it's easier to decode, but more difficult ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access