Re: Question about resource and representation

Amos Jeffries <> Mon, 14 November 2016 05:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 09EA6129543 for <>; Sun, 13 Nov 2016 21:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -8.398
X-Spam-Status: No, score=-8.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 2uutcEi_sSFG for <>; Sun, 13 Nov 2016 21:45:36 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 14DF91295C4 for <>; Sun, 13 Nov 2016 21:45:35 -0800 (PST)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1c6A1j-0001Cj-FR for; Mon, 14 Nov 2016 05:41:55 +0000
Resent-Date: Mon, 14 Nov 2016 05:41:55 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1c6A1e-0001B0-4U for; Mon, 14 Nov 2016 05:41:50 +0000
Received: from [] ( by with esmtp (Exim 4.84_2) (envelope-from <>) id 1c6A1X-00061d-Ou for; Mon, 14 Nov 2016 05:41:44 +0000
Received: from [] (unknown []) by (Postfix) with ESMTP id 731ECE6EA7 for <>; Mon, 14 Nov 2016 18:41:09 +1300 (NZDT)
References: <>
From: Amos Jeffries <>
Message-ID: <>
Date: Mon, 14 Nov 2016 18:41:08 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-1.237, BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: 1c6A1X-00061d-Ou 01bec0cef09b4e6b014d6f0667b2591a
Subject: Re: Question about resource and representation
Archived-At: <>
X-Mailing-List: <> archive/latest/32886
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

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

 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.