request:http()

Tuesday, 26 August 2014 · 3 messages · last reply 27 Aug 2014
IF
Ioan Fericel26 Aug 2014 19:16 #
Hi, congratulations for the job well done on this project! I'm having a problem that I hope you can help me with some guidance. A form made ​​with XForms send data from a instance - with submission, POST method - in a function xq from BaseX, to be saved in the database, and can not find how to retrieve data from the request. We found here ( http://exquery.github.io/expath-specs-playground/request-modules-1.0-specification.html#request-http ) specifications for request:http() function, that seems to be taking all content submitted by post, but not yet implemented. Are likely to be implemented soon, and really do this? What other methods would be to get body content? I found this guidance ( https://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/msg03171.html ) to function http: send-request, but I did not understand how they could solve this. Many thanks, Ioan
CG
Christian Grün26 Aug 2014 21:39 #
Hi Ioan, have you already checked out the documentation of our Request Module [1]? The specification of the module is still in progress, which is the reason why some of the functions differ.
Quoted text · Ioan Fericel · 2 lines
> What other methods would be to get > body content?
Have you already tried to bind the body to a variable via RESTXQ [2]? %rest:PUT("{$body}" Hope this helps, Christian [1] http://docs.basex.org/wiki/Request_Module [2] http://docs.basex.org/wiki/RESTXQ
Quoted text · Ioan Fericel · 20 lines
> I'm having a problem that I hope you can help me with some guidance. A form > made with XForms send data from a instance - with submission, POST method - > in a function xq from BaseX, to be saved in the database, and can not find > how to retrieve data from the request. > > We found here ( > http://exquery.github.io/expath-specs-playground/request-modules-1.0-specification.html#request-http > ) > specifications for request:http() function, that seems to be taking all > content submitted by post, but not yet implemented. Are likely to be > implemented soon, and really do this? What other methods would be to get > body content? I found this guidance ( > https://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/msg03171.html > ) to function http: send-request, but I did not understand how they could > solve this. > > Many thanks, > Ioan > >
IF
Ioan Fericel27 Aug 2014 11:12 #
Quoted text · Christian Grün · 7 lines
On 08/26/2014 10:39 PM, Christian Grün wrote: > > Have you already tried to bind the body to a variable via RESTXQ [2]? > > %rest:PUT("{$body}" > >
It works correctly. Thank you very much, Ioan

⚡Generated with XQuery