Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12033

Rethink how default coapMethod URI option is handled

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.21.0
    • Component/s: camel-coap
    • Labels:
      None
    • Estimated Complexity:
      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.

        Attachments

          Activity

            People

            • Assignee:
              jamesnetherton James Netherton
              Reporter:
              jamesnetherton James Netherton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: