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

Re: Question about resource and representation

From: Yi, EungJun <semtlenori@gmail.com>
Date: Mon, 14 Nov 2016 07:32:59 +0000
Message-ID: <CAFT+Tg8tTFPG2G=+hQUJjs6AcW3KHEQygC2wo12DJ9p0Ri-jxw@mail.gmail.com>
To: Amos Jeffries <squid3@treenet.co.nz>, ietf-http-wg@w3.org
Thanks to Amos and Mike for your great advices!

Thanks to your help, I could correct my understanding about representation
as follows.

1. A representation is an information to be intended to reflect a state of
a given resource, but not needed to be the state itself.

2. The target resource for a POST request may not be the resource that the
representation in the request reflects.

3. An implementor of a HTTP server which serves a POST request should
define a resource that the representation in the request reflects, if they
wants to make their server satisfies the semantics of the HTTP
specification.

On Mon, Nov 14, 2016 at 2:46 PM Amos Jeffries <squid3@treenet.co.nz> wrote:

> On 14/11/2016 6:08 p.m., Yi, EungJun wrote:
> > 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.
> >
>
> For POST there are three resources involved;
>
>  1) the server script/app receiving the POST is a resource (target
> resource in the POST URL)
>
>  2) the processing states that scripts code logic (semantics) can go
> through.
>
>  3) the resulting server data state is a resource (response resource).
>
>
> The payload of the POST relates most directly to (2). It is not a
> physical "thing" resource, just a logical set of processing states.
>
>
>
> Just like other messages the payload of a POST could be in either
> plain-text or compressed form. But as long as the uncompressed data is
> the same set of values the two representations result in the same
> logical processing by the server.
>
>
> HTH
> Amos
>
>
>
Received on Monday, 14 November 2016 07:33:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 14 November 2016 07:33:53 UTC