Subject: [core] Use of PATCH in draft-ietf-core-resource-directory-05

From: Zafi Ramarosandratana <[email-masked]>
Date: Wed, 10 Feb 2016 16:09:28 +0100

All,

Section 5.6 shows the PATCH method for updating links of an endpoint. It
mandates that payload be a merge-patch+json format, which differs from the
rest of the document where the CoRE link format (RFC6690) is used.

IMHO, it would be much convenient to also allow RFC6690 for the PATCH
method.

The following examples illustrate the proposed approach:

- adding the link </sensors/humid>;ct=41;rt="humidity-s";if="sensor" to the
collection of links at the location /rd/4521

 Req: PATCH /rd/4521
 Payload: </sensors/humid>;ct=41;rt="humidity-s";if="sensor"

- modifying all links at the location /rd/4521 which are identified by
href="/sensors/temp"

Req: PATCH /rd/4521?href="/sensors/temp"
Payload: rt="temperature-c";if="sensor"

- removing all links at the location /rd/4521 which are identified by
href="/sensors/light"

Req: PATCH /rd/4521?href="/sensors/light"

Regards,
Zafi.