6Re: [rest-discuss] RESTifying
- Jan 7, 2002
> > So there's no problem with POSTing to /search. That would be one wayRight. I guess I wasn't clear, my apologies.
> > 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.
> So, to review (and make sure I've got a cohesive interface),Hmm, if you're creating a new resource it should be returned with a
> 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
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/addresses could serve that purposes, no need for the new URI.
> GET: representation is an add form
Content negotiation could be used to negotiate a representation
capable of expressing a form.
> http://www.example.org/addresses?query_to_the_dbLooks good.
> GET: representation is a listing of the query
> 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
> http://www.example.org/addresses/thePerson?repr=editAgain, could content negotiation not be used to retrieve an editable
> GET: representation is an edit form
BTW, my other message I promised is turning into something that should
probably be sent to uri@..., so stay tuned.
Mark Baker, Chief Science Officer, Planetfred, Inc.
Ottawa, Ontario, CANADA. mbaker@...
- << Previous post in topic Next post in topic >>