Content types and links
Greg Young <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CAC9RQtgHw78_7_U6iXdmy_bXQhH4YEgAGm9+taMomWJwErx3Ng@mail.gmail.com> |
Let's imagine I had atompub with multiple serialization formats. If
you asked my collection with Header: JSON and I gave you something
like:
{
"title": "vvvvvv",
"id": "http://127.0.0.1:2113/streams/y/1",
"updated": "2012-09-06T16:39:44.695643Z",
"author": {
"name": "ASDASDASD"
},
"summary": "Entry #1",
"links": [
{
"uri": "http://127.0.0.1:2113/x/y/1",
"relation": "edit"
},
{
"uri": "http://127.0.0.1:2113/x/y/c/1?format=text",
"type": "text/plain"
},
{
"uri": "http://127.0.0.1:2113/x/y/c/1?format=json",
"relation": "alternate",
"type": "application/json"
},
{
"uri": "http://127.0.0.1:2113/x/y/c/1?format=xml",
"relation": "alternate",
"type": "text/xml"
}
]
}
Would it seem off to you that I gave you the alternates?
--
Le doute n'est pas une condition agréable, mais la certitude est absurde.