- From: Kev Kirkland <kev@dataunity.org>
- Date: Thu, 30 Oct 2014 10:34:52 +0000
- To: public-hydra@w3.org
- Message-ID: <CAPNZP6JD1-NRop4k+1Ca_=jk9Nhc6xDHdD=eqRtQJskzBd7kXA@mail.gmail.com>
I've been looking at how to edit resources with Hydra. I don't think this has been implemented in the demos yet. For example if you go to the events list demo [1] and choose the PUT operation for one of the events, the form's input boxes are blank rather than having the current event's details filled in. I'm looking to put editing into my AngularJS Hydra client. To fill in the PUT form with the details of the resource you are editing, do you do a GET request to the form's URL to get the representation of the item you are editing then use it to populate the input boxes on the form? So for the events demo would the sequence be: 1. find an event to edit (e.g. /hydra/event-api/events/1) 2. choose the PUT operation for the event 3. do a GET request to fetch the resource's representation (e.g. GET hydra/event-api/events/1) 4. use the GET request's data to fill in the input boxes on the PUT form 5. submit the PUT request (with user's edits) to the url of the event (e.g. /hydra/event-api/events/1)? Thanks, Kev [1] http://www.markus-lanthaler.com/hydra/console/?url=http://www.markus-lanthaler.com/hydra/event-api/events/ -- www.dataunity.org twitter: @data_unity
Received on Thursday, 30 October 2014 10:35:20 UTC