`REPRESENTATIONAL STATE TRANSFER`首字母缩略词对`STATE TRANSFER`的一些误解

Few Misunderstandings of `STATE TRANSFER` in the acronym `REPRESENTATIONAL STATE TRANSFER`

所以我对REPRESENTATIONAL STATE TRANSFER.

中的名字STATE TRANSFER有一些误解

示例:假设客户端通过点击 /XCompanyPrice URI 请求某些 X company 的当前股价,并在服务器的当前实例中请求 company x 的股价是 2 美元,这就是所谓的 current state of the resource,资源状态可能会发生变化,这是我们可以说的吗?这就是 STATE 在首字母缩略词 REPRESENTATIONAL STATE TRANSFER?

中的意思

根据 REPRESENTATIONAL STATE TRANSFER.

哪个是正确的

因此,REPRESENTATIONAL STATE TRANSFER 中的名称 state transfer 表示 the state of the application changes by dataTransferring representations of resource which is there in the server at the current time????

请帮忙。

有关“REST”含义的唯一权威信息来源是Roy Fielding's dissertation介绍和定义该术语。

您的问题最简洁的答案可能在 section 5.2.1.2:

REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation is a sequence of bytes, plus representation metadata to describe those bytes.... Depending on the message control data, a given representation may indicate the current state of the requested resource, the desired state for the requested resource, or the value of some other resource, such as a representation of the input data within a client's query form, or a representation of some error condition for a response.

换句话说,组件(如客户端或服务器)通过传输表示对资源进行操作状态到另一个组件。

我不完全理解你提到的各种定义和例子,但我想说最后一个基本上是正确的。第二个似乎不正确,因为这里的“状态”显然是指特定资源而不是模糊的“应用程序状态”。