Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
The CoAP endpoint has a coapMethod option which defaults to "*". This is used on the consumer to signify that all methods are allowed.
However, no thought seems to have been given to how this is handled in the producer. There's a switch block with cases handling individual method names. But nothing for "*", hence the CoAP client is never invoked and no response is set on the message exchange.
Maybe we make things like the camel HTTP components? coapMethod can be modified to coapMethodRestrict to deal with the consumer part.
The method to use on the producer side can be inferred from whether we have a message payload (POST) or not (GET). Else we use pick the method from a header like CamelCoapMethod.