Re: [core] More precision about CoAP Observe with FETCH

Jon Shallow <> Tue, 29 June 2021 09:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 199943A2D54 for <>; Tue, 29 Jun 2021 02:45:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id f6O26oOvpaHD for <>; Tue, 29 Jun 2021 02:45:51 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A94C23A2D52 for <>; Tue, 29 Jun 2021 02:45:50 -0700 (PDT)
Received: from ([] helo=N01332) by with esmtp (Exim 4.92.3) (envelope-from <>) id 1lyAJL-00049d-Dr; Tue, 29 Jun 2021 10:45:43 +0100
From: "Jon Shallow" <>
To: "'Simon Bernard'" <>, <>
References: <>
In-Reply-To: <>
Date: Tue, 29 Jun 2021 10:45:54 +0100
Message-ID: <013501d76ccb$8e2be040$aa83a0c0$>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0136_01D76CD3.EFF04840"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQICowpRfhMxcn6CYMw9eR2mIOGlfarUT20g
Content-Language: en-gb
Archived-At: <>
Subject: Re: [core] More precision about CoAP Observe with FETCH
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 29 Jun 2021 09:45:55 -0000

Hi Simon,


As per the FEETCH request body is a part of the cache key.


   Depending on the response code as defined by [RFC7252 <> ], the response

   to a FETCH request is cacheable; the request body is part of the

   cache key.  Specifically, 2.05 (Content) response codes (the

   responses for which are cacheable) are a typical way to respond to a

   FETCH request.  (Note that this aspect differs markedly from

   [HTTP-SEARCH <> ] and also that caches that cannot use the request

   payload as part of the cache key will not be able to cache responses

   to FETCH requests at all.)  The Max-Age option in the response has

   equivalent semantics to its use in a GET.


So, different payloads would create different cache keys and hence individually be unique.





From: Simon Bernard [mailto:] 
Sent: 29 June 2021 10:19
To: WG
Subject: [core] More precision about CoAP Observe with FETCH


Hi all,

  The PATCH and FETCH Methods for the Constrained Application Protocol (CoAP) (RFC8132 <> ) says that FETCH can be used with RFC7641 <>  (Observing Resources in CoAP)

2.4 <> .  Working with Observe
   The Observe option [RFC7641 <> ] can be used with a FETCH request as it
   can be used with a GET request

  But "CoAP Observe" seems to be designed with a "GET without payload" in mind.
  E.g. it says : 

3.1 <> .  Request
   A client registers its interest in a resource by issuing a GET
   request with an Observe Option set to 0 (register).  If the server
   returns a 2.xx response that includes an Observe Option as well, the
   server has successfully added an entry with the client endpoint and
   request token to the list of observers of the target resource, and
   the client will be notified of changes to the resource state.
   Like a fresh response can be used to satisfy a request without
   contacting the server, the stream of updates resulting from one
   observation request can be used to satisfy another (observation or
   normal GET) request if the target resource is the same.  A client
   MUST aggregate such requests and MUST NOT register more than once for
   the same target resource.  The target resource is identified by all
   options in the request that are part of the Cache-Key. This includes,
   for example, the full request URI and the Accept Option.  

The target resource is not identified by the payload.  So 2 FETCH requests on same resource with 2 different payload seem to not be allowed ? 

Is it intended or just an oversight ? if this is intended, is there any particular reason about this ?