Skip to content

Support custom attribute for well-known/core query #2016

Description

@bethmal

Is your feature request related to a problem? Please describe.

There is no easy way to support custom attribute to query via "well-known/core?custom_attr=...".

Describe the solution you would like

In coap_resource.c, declare _rt_attributes like below:

static const coap_str_const_t _rt_attributes[] = {
{2, (const uint8_t *)"rt"},
{2, (const uint8_t *)"if"},
{3, (const uint8_t *)"rel"},
#ifdef WELLKNOWN_CORE_CUSTOM_ATTRIBUTES
WELLKNOWN_CORE_CUSTOM_ATTRIBUTES,
#endif
{0, NULL}
};

Describe alternatives you have considered

Implement custom well-known/core handler. However, this seems meaningless to not easily reuse the existing well implemented well-known/core handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions