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

Re: [rest-discuss] How to GET a for editing in RESTful design?

Expand Messages
  • Adam Ratcliffe
    Unfortunately not. Safari transparently converts PUT and DELETE requests into GETs. Cheers Adam
    Message 1 of 59 , Aug 5, 2006
    • 0 Attachment
      Unfortunately not. Safari transparently converts PUT and DELETE
      requests into GETs.

      Cheers
      Adam

      On 6 Aug, 2006, at 12:07 PM, Scott Chapman wrote:

      > Adam Ratcliffe wrote:
      >> On 6 Aug, 2006, at 11:21 AM, Scott Chapman wrote:
      >>>
      >>> These appear to me to not be RESTful. I understand that you're
      >>> supposed to
      >>> use only one URL for a resource whether to view, update, or
      >>> delete it.
      >>> Perhaps a different URL to create a new resource.
      >> I don't believe REST constrains a resource's state to being
      >> manipulated through its URL only. Given that GET and POST are the
      >> only HTTP methods reliably available in the brower (assuming your
      >> building a web application) PUT and DELETE operations may need to
      >> be implemented through POSTing to another resource. For example
      >> you might create a new resource by POSTing to a collection resource.
      >
      > I understand all the HTTP methods (GET, POST, PUT, DELETE, HEAD, ?)
      > can be done correctly using xmlhttprequest in all modern browsers.
      > Is this incorrect?
      >
      > Scott
      >
    • Jan Algermissen
      Bill, Scott, yepp, APP solves all of these in a standardized way. IIRC there is actually already a standardized means to find the editing-resource of another
      Message 59 of 59 , Jan 4, 2007
      • 0 Attachment
        Bill, Scott,

        yepp, APP solves all of these in a standardized way.

        IIRC there is actually already a 'standardized' means to find the editing-resource of another resource by pure HTTP mechanisms: The Link header together with the 'source' relation. That is, if the server tells you about a related resource via a Link of type 'source' all editing should be applied to that one.

        I recall Roy having mentioned that on one of the Atom lists.

        Though I have no idea about the actual standardization status of either the Link header nor the source relation...

        Jan



        On 08.08.2006, at 18:11, Bill de hÓra wrote:

        Scott Chapman wrote:
        >
        >
        > If hitting a URL with GET is supposed to give you a view of the resource
        > and
        > it's not a form by default, then how to do you get a <form...> view of
        > it for
        > editing?
        >
        > The same applies to getting a blank form for creating a new resource.
        >
        > How are people handling these situations in their RESTful designs?

        The most common pattern today is to provide the form at another URL,
        which you typically embed as a link in the representation. Blog APIs do
        something similar by providing a URL you post into. Looking further out,
        atom protocol will standardize a means for getting at what it calls the
        "edit-uri" for a resource.

        It's a good question, illuminating even.

        cheers
        Bill


      Your message has been successfully submitted and would be delivered to recipients shortly.