I'm designing a web-app that will use a REST API. What I've never understood is what is REST's equivalent of HTML forms? HTML5 forms have a reasonably rich set of server-provided, declarative controls, constraints and validation.
Is the server supposed to send a MIME type (name) or is there an equivalent of HTML forms for REST? A named type (MIME or otherwise) is inferior to an HTML form as it is only a name, not the actual form construct; the client would need to interpret the name into a form - which is incorrect IMO - too much knowledge in the client.
My client would take the form definition and create an HTML form equivalent.
XForms (https://en.wikipedia.org/wiki/XForms) always struck me as "nice" but it's XML based and seems pretty dead. I'm not averse to XForms as I have a preference for XML, XSD, XSLT, XPath over JSON but I'll probably go with the flow and use JSON for simplicity.