W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2016

RE: Question about resource and representation

From: Mike Bishop <Michael.Bishop@microsoft.com>
Date: Mon, 14 Nov 2016 05:25:52 +0000
To: "Yi, EungJun" <semtlenori@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <BN6PR03MB270841E419A438C4603AF2B387BC0@BN6PR03MB2708.namprd03.prod.outlook.com>
Interesting philosophical question.

In the sense that POST is different from PUT (representation is desired end state) or PATCH (representation is difference between current state and desired state), that’s true.  You can’t necessary look at the request and the result of a GET and predict the end state of the resource after the POST.

But consider that “the resource’s own specific semantics” can be treated as a function that takes some input and produces a desired state.  POST, in effect, says “I know that function, and here’s the input required to create the desired state.”  An observer doesn’t know the function, but that’s irrelevant if the client and server do.  And if they both do, then the input is “a format that can be readily communicated.”

From: Yi, EungJun [mailto:semtlenori@gmail.com]
Sent: Monday, November 14, 2016 2:09 PM
To: ietf-http-wg@w3.org
Subject: Question about resource and representation


Hi,



According to RFC 7231, a representation is a state of a given resource



   For the purposes of HTTP, a "representation" is information that is

   intended to reflect a past, current, or desired state of a given

   resource, in a format that can be readily communicated via the

   protocol, and that consists of a set of representation metadata and a

   potentially unbounded stream of representation data.



and a payload in a POST request is also a representation.



   The POST method requests that the target resource process the

   representation enclosed in the request according to the resource's

   own specific semantics.



Then what is the resource which the representation enclosed in the POST request reflects? I think the representation may not reflect a state of the target resource for the POST request.



Thanks in advance.



Best regards,

EungJun


Received on Monday, 14 November 2016 05:26:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 14 November 2016 05:26:34 UTC