5572RE: [rest-discuss] Correct REST principles
- Dec 2, 2005Donald Strong wrote:
> > But I propose the following:Comma is also legal, by the way: .../90.0,12.0
> > http://[host]/[universe]/[galaxy]/[system]/[planet]/90.0%2012.0
> I have also suggested using segment parameters in the past.It occurs to me that the path part works particularly well for
> This has the advantage that more segments can be used after the
> params. In this case I have specified a height or 30000 feet.
anything that's worth naming individually. While every point in
space could be considered a meaningful resource, not every point
is really worth naming. Also notice that we're starting to deal
with *approximate* values here. The most useful thing to do when
given a pair of approximate coordinates might be to produce a list
of things worth naming approximately at or near those coordinates.
In this case, putting the coordinates in the query string makes
perfect sense, with the response then actually naming interesting
sites such as...
== User-Agent ==
== Server ==
http://.../universe/milkyway/sol/earth/whitehouse (1000 miles)
http://.../universe/milkyway/sol/earth/kremlin (10000 miles)
http://.../universe/milkyway/sol/earth/tajmahal (15000 miles)
== end ==
But of course if the application really wants to name every point
in space, any of the above syntaxes is fine.
(I waffle about the trailing slash; it's really just an aesthetic
thing, but it gives some suggestion of a resource being a
collection, and it does make relative URIs more convenient.)
- << Previous post in topic Next post in topic >>