It changes how CoAP ContentFormat is translated in crosscoap. The change is required because right now, it's impossible to add new ContentFormat that shares HTTP ContentType (i.e. "application/json") with an already existing item. This change also allows to specify Encoding, when defined, the value is transfered in HTTP request via Content-Encoding.
It adds support for application/json compressed with deflate algorithm. Value of this ContentFormat is already registered with IANA[0]. This addition makes use of the previous change.
This PR does two things.
It changes how CoAP ContentFormat is translated in crosscoap. The change is required because right now, it's impossible to add new ContentFormat that shares HTTP ContentType (i.e. "application/json") with an already existing item. This change also allows to specify Encoding, when defined, the value is transfered in HTTP request via
Content-Encoding
.It adds support for application/json compressed with deflate algorithm. Value of this ContentFormat is already registered with IANA[0]. This addition makes use of the previous change.
[0] https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#content-formats