Representing HTTP forms in Hydra

Hi I would like to describe an application/x-www/form-urlencoded form much
like I can for
IRI templates.  What I have been using is the hydra:supportedProperty
property on a
hydra:Class.

For instance this is my form being POSTed to the service:


cookieService:CookiesForm
     rdfs:type hydra:Class ;
     rdfs:comment "The cookie form can be submitted with "

     hydra:supportedProperty [
         rdfs:type hydra:SupportedProperty
         rdfs:comment "The _method hack for non-RESTful clients"
         hydra:property cookieService:method
         hydra:variable "_method"
     ] ;

     hydra:supportedProperty [
           rdfs:type hydra:SupportedProperty ;
           rdfs:comment "URL to redirect to" ;
           hydra:property http:location ;
           hydra:variable "location"
     ] ;

     hydra:supportedProperty [
           rdfs:type hydra:SupportedProperty ;
           rdfs:comment "The content type to return; supported content
types are 'text/html' and 'application/json'" ;
           hydra:property http:accept ;
           hydra:variable "accept"
     ] .

I noticed that hydra:variable has a domain of hydra:IriTemplateMapping
which turns the range of the hydra:supportedProperty into a
hydra:IriTemplateMapping; which it is not.

Our clients are a mix of HTML, JSON and Linked Data clients so I would like
to be able to describe how HTML clients can be rendered using Hydra.

Is it possible to describe how to construct a
application/x-www/form-urlencoded using Hydra like we can for an Iri
Template?

Eric Moritz

Received on Monday, 31 March 2014 16:51:09 UTC