Loading ...
Sorry, an error occurred while loading the content.

5572RE: [rest-discuss] Correct REST principles

Expand Messages
  • Justin T. Sampson
    Dec 2, 2005
      Donald Strong wrote:

      > > But I propose the following:
      > > http://[host]/[universe]/[galaxy]/[system]/[planet]/90.0%2012.0

      Comma is also legal, by the way: .../90.0,12.0

      > I have also suggested using segment parameters in the past.
      > http://acme.com/universe/milkyway/sol/earth/lat=90.0;long=12.0/30000
      > This has the advantage that more segments can be used after the
      > params. In this case I have specified a height or 30000 feet.

      It occurs to me that the path part works particularly well for
      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 ==
      GET http://.../universe/milkyway/sol/earth/?lat=90.0&long=12.0
      == 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.)

    • Show all 11 messages in this topic