What does “hypermedia data formats” mean in Fieldi

2019-06-08 08:52发布

Below is quoted from Fielding's REST dissertation 6.4.3.2 Cookies

Likewise, the use of cookies to identify a user-specific “shopping basket” within a server-side database could be more efficiently implemented by defining the semantics of shopping items within the hypermedia data formats, allowing the user agent to select and store those items within their own client-side shopping basket, complete with a URI to be used for check-out when the client is ready to purchase.

For the bold part, does it mean to store the items in the page? Such as hidden elements of a form? If so, I think customer will lose his purchase when he leaves the page.

So what exactly does the hypermedia data formats mean?

标签: rest cookies
1条回答
神经病院院长
2楼-- · 2019-06-08 09:09

What it is talking about is what format the data being transferred is so the client knows how to read it and what to do with it. So with HTML, the format would be "text/html" and with mp4 audio it would be "audio/mp4".

Without such indications when the data is sent by the server, the client has no way of knowing for sure how to interpret the data being sent.

While the data can be defined and interpreted using other methods, hypermedia data formats are part of the HTTP standard and well defined, not requiring any outside helpers.

查看更多
登录 后发表回答