coap_ex
coap_ex copied to clipboard
content_type vs content_format
Hey :),
First of all, thanks a lot for the lib, I am enjoying using so far.
On Plug.Conn.req_headers, the coap_ex translate to content_format but plug translates to content-type
For example, the Plug.Conn.req_headers for a phoenix call
[
{"connection", "keep-alive"},
{"content-length", "9"},
{"content-type", "application/json"},
{"host", "localhost:4000"},
{"te", ""}
]
but the Plug.Conn.req_headers for a coap_ex call
[
content_format: "application/cbor",
uri_host: "localhost",
uri_path: ["broker", "api", "v2", "registry"],
uri_port: 5683
]
because of that, I am having problems to write a parser for CBOR, since Plug.Parsers looks for content-type