RE: Project Introduction

On Wednesday, December 6, 2017 2:13 PM, Martin Bailey wrote:
> I have authored a quick read me describing my experience of using Hydra.
> I have included some actual code examples. These are available here :
>
> https://github.com/drzoidb3rg/hydra 

Cool, thanks for writing this up. You wrote

    For lists, most of the time the POST operation is attached to the list. In
    many cases it is required to model the postform as a separate hypermedia
    resource. In this instance the list then has a link to the postform. Since the
    Id of the postform is not the Id to actually perform a post to add an item, 
    we tend to add a Link to the list on the postform representation.

    I guess a better solution would have beeen to model the Postform
    representation as an empty list, which will include the associated POST
    operation.

Let me ask a few questions about this to make sure I fully understand this. Where do you want the client to send the HTTP POST request to? The following Hydra snippet says the POST should go to /reviewlistpostform

  https://github.com/drzoidb3rg/hydra/blob/master/ReviewListPostForm/ReviewListPostForm.json

The form HTML file in the same folder however shows a form which POSTs to /reviewlist

  https://github.com/drzoidb3rg/hydra/blob/master/ReviewListPostForm/ReviewListPostForm.html

Btw. why did you decide to split the form and the operation?


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Sunday, 10 December 2017 09:41:41 UTC