REST interface does not support/comply-with 'default' XForms mediatype (application/xml) for PUT, POST (and possibly others)
Wednesday, 3 November 2010 · 3 messages · last reply 4 Nov 2010
MD
Mahender Didwania3 Nov 2010 16:12 #
If I attempt to create a resource using PUT or POST using XForms Submission mechanism, it fails because by default, XForms Submissions use application/xml as content-type, but BaseX expects text/xml. BaseX actually fails the request if given application/xml!
Would like BaseX to support XForms - XForms default submission mediatypes are listed at http://www.w3.org/TR/xforms11/#submit-options
Thanks.
CG
Christian Grün3 Nov 2010 21:28 #
Quoted text · Mahender Didwania · 3 lines
> If I attempt to create a resource using PUT or POST using XForms Submission mechanism, it fails because by default, XForms Submissions use application/xml as content-type, but BaseX expects text/xml. BaseX actually fails the request if given application/xml! > > Would like BaseX to support XForms - XForms default submission mediatypes are listed at http://www.w3.org/TR/xforms11/#submit-options
That's an interesting suggestion. We have come across other use cases in which text/xml was the preferred content-type, but it could be reasonable to add application/xml to be conformant with the XForms requirements (this is going to happen pretty soon, as we've just extended some other REST features).
More feedback is welcome,
Christian
CG
Christian Grün4 Nov 2010 18:17 #
Dear Mahender,
we have decided to support both text/xml and application/xml as consumed types for POST and PUT. If you are interested in a snapshot, feel free to tell us, or check out our "basex" and "basex-api" packages in the repository. The changes will be available in the next minor release.
Christian
Quoted text · Christian Grün · 15 lines
On Wed, Nov 3, 2010 at 9:28 PM, Christian Grün <christian.gruen at gmail.com> wrote: >> If I attempt to create a resource using PUT or POST using XForms Submission mechanism, it fails because by default, XForms Submissions use application/xml as content-type, but BaseX expects text/xml. BaseX actually fails the request if given application/xml! >> >> Would like BaseX to support XForms - XForms default submission mediatypes are listed at http://www.w3.org/TR/xforms11/#submit-options > > That's an interesting suggestion. We have come across other use cases > in which text/xml was the preferred content-type, but it could be > reasonable to add application/xml to be conformant with the XForms > requirements (this is going to happen pretty soon, as we've just > extended some other REST features). > > More feedback is welcome, > Christian >
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery