Description
I'm opening this to continue the discussions around the "form"
proposal from #280 and #290, which have been closed in order to split everything else from those discussions out into separate PRs (#292 and #293). This issue is for tracking @jdesrosiers concerns that are not addressed by those PRs. Also paging @dlax, @Relequestual, and @awwright.
Everything below the following line is from @jdesrosiers in #290 (comment)
(the quote to which he is respoinding is from @awwright)
Can you elaborate some on how clients, as you would like to see, might act differently for different values of "method" or "form"?
Honestly, I'm a little perplexed by this question. First of all, method
doesn't exist in this context. "method": "post"
was replaced with "form": true
and "method": "get"
was removed in favor of hrefSchema
. So there are only two possible values. Understanding the difference is no harder than understanding HTML. How does a client act differently when it encounters an <a>
opposed to encountering a <form>
.
-
"form": false
(default)
The LDO is analogous to an<a>
. Really, it's closer to the Link header, but that's not really the point. A client can do anything with that link that it has enough information to do. A web browser doesn't have enough information to do anything but retrieve it. An LDO with"form": false
has more information than an<a>
allowing a client to do more things with it based on target hints, but it is basically the same thing. -
"form": true
The LDO is analogous to a<form>
. A<form>
is a construct for sending data to a resource. A client can proceed taking that assumption into account. For example a client knows it is going to need user input and should prompt the user for that data. This is different from a Link where you would have to first select which method you want to use, then the client determines if it needs to prompt the user for input.
It's pretty obvious how a web browser behaves differently when it encounters an <a>
versus when it encounters a <form>
. It should be no less obvious for a hyper-schema client encountering "form": false
versus "form": true
.