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

3Re: [rest-discuss] RESTifying

Expand Messages
  • Mark Nottingham
    Jan 7, 2002
    • 0 Attachment
      On Mon, Jan 07, 2002 at 10:03:17AM -0500, Mark Baker wrote:
      > > One can add to the database by doing a get (for the form) and then a
      > > POST to
      > > http://www.example.org/add
      > Why not POST to http://www.example.org/search? The good thing about
      > doing that is that an intermediary would know that /search has changed
      > state due to the POST, whereas if it went to /add, the state change
      > would be transparent and the intermediary wouldn't know.

      hmm. Individual searches are separate resources; i.e., they have
      different query strings, so this wouldn't necessarily work, no? (It
      wouldn't make sense to POST a query, obviously).

      > Also, search may not be the best name if you're posting to it.
      > /What about
      > this?
      > http://www.example.org/database
      > or, if the database is a list of employees;
      > http://www.example.org/employees

      Yes. I knew that that was a problem, just didn't have a good
      mechanism; perhaps it would be good to have a DN->resource mapping,
      so that


      maps to 'dc=example,dc=org' (if that's the DN being used for
      addresses. Then, individual entries could be maped to


      or somesuch.

      This might be a horrible abuse of LDAP, but hey, I'd
      rather abuse it than the Web ;)

      > An "edit" should be done with a PUT interface, no? I know that this
      > is problematic given that browsers/HTML only support GET/POST, but if
      > you can afford it (development time, extra code to maintain, performance
      > hit with another layer), I'd solve that problem after exposing the PUT
      > interface, perhaps by having a separate Wiki-looking URI that accepts
      > POSTs and treats them as PUTs.
      > e.g.
      > http://www.example.org/employees?id=234343?pap=true
      > ("pap" => "post-as-put")

      Sure. Perhaps start with pap and then backport. I'm doing this with
      python's BaseHTTPServer, so I can do anything fairly easily ;)

      > You can use them with URI refs;

      Yes. What I'm getting at is that the WIKI-like mechanisms such as


      are a complete kludge; from a resource standpoint, these might as
      well be


      because of opacity; the only person who knows that ?pap=true does
      something special is the publisher.

      P.S. it would be interesting to see an analysis of the RESTyness of

      Mark Nottingham
    • Show all 14 messages in this topic