the mime type seems correct, all params are being sent. I do not have problems getting the body, only request:parameter-names() does not give any values. (request:header works, for example)
-----Ursprüngliche Nachricht----- Von: Marco Lettere <m.lett...@gmail.com> Gesendet: Mittwoch, 22. April 2020 15:31 An: Zimmel, Daniel <d.zim...@esvmedien.de>; basex-talk@mailman.uni-konstanz.de Betreff: Re: AW: [basex-talk] A question about RESTXQ rest:form-param() Are you setting the mime type to "application/x-www-form-urlencoded"? This is the prerequisite in order to get the body of a post parsed to form parameters. M. On 22/04/20 15:22, Zimmel, Daniel wrote: > Thanks for the hint Marco, > > I just tried request:parameter-names(): that one works with GET but with POST > I get an empty-sequence, I am not sure what the problem is here. > I can access the full (unparsed) body, though (I can use that). > > Daniel > > -----Ursprüngliche Nachricht----- > Von: Marco Lettere <m.lett...@gmail.com> > Gesendet: Mittwoch, 22. April 2020 14:24 > An: basex-talk@mailman.uni-konstanz.de > Betreff: Re: [basex-talk] A question about RESTXQ rest:form-param() > > Hi Daniel, > another way is to use request:* functions [1] available for programmatic > inspection of the request. > Cheers, > M. > > [1] https://docs.basex.org/wiki/Request_Module > > > On 22/04/20 12:18, Zimmel, Daniel wrote: >> Hi Daniel, >> >> RTFM. Simply pass the body in %rest:POST("{$body}"). >> >> Sorry for disturbing! >> >> Daniel >> >> -----Ursprüngliche Nachricht----- >> Von: Zimmel, Daniel <d.zim...@esvmedien.de> >> Gesendet: Mittwoch, 22. April 2020 11:27 >> An: BaseX <basex-talk@mailman.uni-konstanz.de> >> Betreff: [basex-talk] A question about RESTXQ rest:form-param() >> >> Hi, >> >> in an HTML form with a RESTXQ POST action, do I really have to declare >> %rest:form-param() for every param, or is there a way to pass the full query >> component in one parameter? >> >> Best, Daniel >>