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

6Re: [rest-discuss] RESTifying

Expand Messages
  • Mark Baker
    Jan 7, 2002
      > > So there's no problem with POSTing to /search. That would be one way
      > > for Google to allow people to register new unindexed resources, for
      > > example. But as mentioned below, the name is confusing.
      >
      > Well, there's no problem POSTing an update to /search (or whatever),
      > but doing a query through POST doesn't seem very RESTy at all.

      Right. I guess I wasn't clear, my apologies.

      > So, to review (and make sure I've got a cohesive interface),
      >
      > http://www.example.org/addresses
      > Exposes the DB as a whole
      > GET: representation is the main interface (queries, etc.)
      > POST: add a new entry, returns a 303 to the created resource

      Hmm, if you're creating a new resource it should be returned with a
      201. You won't get an auto redirect, but the client will know the
      URI of the new resource. The body can also include a link if a
      browser is your client.

      > http://www.example.org/addresses?repr=add
      > GET: representation is an add form

      /addresses could serve that purposes, no need for the new URI.
      Content negotiation could be used to negotiate a representation
      capable of expressing a form.

      > http://www.example.org/addresses?query_to_the_db
      > GET: representation is a listing of the query

      Looks good.

      > http://www.example.org/addresses/thePerson
      > exposes a particular record
      > GET: representation is a person's record
      > POST: update the resource/record, returns a 303 to the resource
      > PUT: create the resource/record (multiple content-types
      > supported?), returns a status page (or a 303?)
      > DELETE: delete the resource/record, returns a status page

      Good.

      > http://www.example.org/addresses/thePerson?repr=edit
      > GET: representation is an edit form

      Again, could content negotiation not be used to retrieve an editable
      format?

      BTW, my other message I promised is turning into something that should
      probably be sent to uri@..., so stay tuned.

      MB
      --
      Mark Baker, Chief Science Officer, Planetfred, Inc.
      Ottawa, Ontario, CANADA. mbaker@...
      http://www.markbaker.ca http://www.planetfred.com
    • Show all 14 messages in this topic