ibm-security-innovation / crosscoap

CoAP-to-HTTP translator proxy
https://developer.ibm.com/open/crosscoap/
Apache License 2.0
66 stars 22 forks source link

Support application/json compressed with deflate algorithm #9

Closed besedad closed 5 years ago

besedad commented 5 years ago

This PR does two things.

  1. 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.

  2. 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

dubek commented 5 years ago

Merged. Thanks @besedad for your contribution.