RE: Question about resource and representation

Mike Bishop <Michael.Bishop@microsoft.com> Mon, 14 November 2016 05:29 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1B1191295C4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 13 Nov 2016 21:29:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.497
X-Spam-Level:
X-Spam-Status: No, score=-8.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=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
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U8EYkbt0TE3u for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 13 Nov 2016 21:29:51 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 21D6E127077 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 13 Nov 2016 21:29:51 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c69mw-0006to-7X for ietf-http-wg-dist@listhub.w3.org; Mon, 14 Nov 2016 05:26:38 +0000
Resent-Date: Mon, 14 Nov 2016 05:26:38 +0000
Resent-Message-Id: <E1c69mw-0006to-7X@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <Michael.Bishop@microsoft.com>) id 1c69mp-0006rn-0r for ietf-http-wg@listhub.w3.org; Mon, 14 Nov 2016 05:26:31 +0000
Received: from mail-co1nam03on0102.outbound.protection.outlook.com ([104.47.40.102] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from <Michael.Bishop@microsoft.com>) id 1c69mi-0002fh-BV for ietf-http-wg@w3.org; Mon, 14 Nov 2016 05:26:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=PUNgqzIDojLtvWnZ0QUPluWDsD8H9azHS966gX+521Q=; b=I/21OGs/9JWN/eUvB3GszvWqKTYaxIeuBl+iFwg7geSwDqZpTtfQDZiuLS5uhfkcO3/st5Gi+qZQRgINkQPGjJCv8NWKveOAyyG9LHJNuzIZWOaNGSkakT9ha0REMIZeOyFBUL37O+6yFlNm3/L4kF9+XYJFWsYyx0thJkub2To=
Received: from BN6PR03MB2708.namprd03.prod.outlook.com (10.173.144.15) by BN6PR03MB2705.namprd03.prod.outlook.com (10.173.144.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Mon, 14 Nov 2016 05:25:52 +0000
Received: from BN6PR03MB2708.namprd03.prod.outlook.com ([10.173.144.15]) by BN6PR03MB2708.namprd03.prod.outlook.com ([10.173.144.15]) with mapi id 15.01.0707.015; Mon, 14 Nov 2016 05:25:52 +0000
From: Mike Bishop <Michael.Bishop@microsoft.com>
To: "Yi, EungJun" <semtlenori@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Thread-Topic: Question about resource and representation
Thread-Index: AQHSPjXbgGSJ95nP2Eq1bn3N+PXHXKDX8Dwg
Date: Mon, 14 Nov 2016 05:25:52 +0000
Message-ID: <BN6PR03MB270841E419A438C4603AF2B387BC0@BN6PR03MB2708.namprd03.prod.outlook.com>
References: <CAFT+Tg_UcBbHD1yz=26FUa6i6Ja=Z2O5UoJa_id4-MYM-X9iEA@mail.gmail.com>
In-Reply-To: <CAFT+Tg_UcBbHD1yz=26FUa6i6Ja=Z2O5UoJa_id4-MYM-X9iEA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Bishop@microsoft.com;
x-originating-ip: [31.133.142.187]
x-microsoft-exchange-diagnostics: 1; BN6PR03MB2705; 7:xvhxau/rxSu4po5PhIgVvMNTa0c+NPw17+VuMqAQmMZZI4X7rVlzt3N75zCQC00A2hiFvt3hjOkGAYb9ILyNNjRr9N/LYzj7klvhk2FAw9J85NOgJ//X0c8JcuuT0ODrCFeiL6mCwMHPnDMx4DTcRZ+HBvqvBgyXm+VL2qH+y44ln0LC63c7UV//zHMYqwUCmqSqcGrBiQwmGk23bDQ/8vnfEucim1oxqgCQX9rmFwZ0sfMLG6fni2qBlpYKb+d/LgYBDKMD3bTo4gOa6vipbDx2rFgBaZ1ayCi4kFiWYxgEDFfFT6kZeaGTnUKaHuDP5DV2c7rDjSdgJ+LiIITVFbvHK4qJCd2/X3LoZQdO8QMv6771+Bs7XygZ2wwS/9kM
x-ms-office365-filtering-correlation-id: 12e497d3-d9c3-4fe7-c390-08d40c4eb39c
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2705;
x-microsoft-antispam-prvs: <BN6PR03MB27057D89B3F9234CF0EF952187BC0@BN6PR03MB2705.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6045074)(6060320)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6046074)(6061315); SRVR:BN6PR03MB2705; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2705;
x-forefront-prvs: 0126A32F74
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(336003)(199003)(51874003)(377454003)(189002)(87936001)(2906002)(229853002)(106356001)(81156014)(3660700001)(6116002)(790700001)(102836003)(3846002)(5005710100001)(189998001)(54356999)(92566002)(7846002)(107886002)(586003)(8990500004)(97736004)(50986999)(10290500002)(7696004)(2501003)(81166006)(7736002)(66066001)(2950100002)(5001770100001)(86612001)(106116001)(86362001)(122556002)(2900100001)(8676002)(76176999)(10090500001)(68736007)(33656002)(9686002)(105586002)(101416001)(74316002)(8936002)(99286002)(77096005)(76576001)(5660300001)(3280700002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR03MB2705; H:BN6PR03MB2708.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BN6PR03MB270841E419A438C4603AF2B387BC0BN6PR03MB2708namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2016 05:25:52.4728 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2705
Received-SPF: pass client-ip=104.47.40.102; envelope-from=Michael.Bishop@microsoft.com; helo=NAM03-CO1-obe.outbound.protection.outlook.com
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.797, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_NW=0.5
X-W3C-Scan-Sig: titan.w3.org 1c69mi-0002fh-BV b9a05a29c4012b2e42ab0af2436e94c4
X-Original-To: ietf-http-wg@w3.org
Subject: RE: Question about resource and representation
Archived-At: <http://www.w3.org/mid/BN6PR03MB270841E419A438C4603AF2B387BC0@BN6PR03MB2708.namprd03.prod.outlook.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32885
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

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