[basex-talk] getting request's headers inside a Web Application

2021-06-15 Thread dudz...@yahoo.com
Dear all, I do not see an option to obtain the headers from the HTTP request from inside webapp function. Just like in the example: declare   %rest:GET   %rest:path('tests-html')   ???%rest:headers('User-Agent')???   %output:method('html') function page-main:start-empty(   ???$user-agent as

Re: [basex-talk] getting request's headers inside a Web Application

2021-06-15 Thread Christian Grün
Hi BR, You can also use the %rest:header-param annotation: declare %rest:path('/test') %rest:header-param('User-Agent', '{$agent}') function local:test($agent) { element agent { $agent } }; Check out [1] for "User-Agent" and additional examples. Best, Christian [1]

Re: [basex-talk] getting request's headers inside a Web Application

2021-06-15 Thread Andy Bunce
Hi BR, When called from within a WebApp this should give the result you are looking for.. *request:header*( 'User-Agent') See https://docs.basex.org/wiki/Request_Module#request:header /Andy On Tue, 15 Jun 2021 at 15:33, dudz...@yahoo.com wrote: > Dear all, > > I do not see an option to

Re: [basex-talk] http:sent-request with username, password and auth-method results in improper use msg

2021-06-15 Thread Christian Grün
Hi Rob, A fix is available [1]. Could you give it another go? Dank je wel, Christian [1] https://files.basex.org/releases/latest/ On Tue, Jun 15, 2021 at 9:59 AM Rob Stapper wrote: > > Hi Cristian, > > > > When I add the username, password,auth-method to a http-request [1] I get an >

Re: [basex-talk] http:sent-request with username, password and auth-method results in improper use msg

2021-06-15 Thread Christian Grün
Hi Rob, If my assumption is correct that the URL points to a RESTXQ function… Could you share this function with us, or provide us with a minimized version of it? Thanks in advance Christian On Tue, Jun 15, 2021 at 9:59 AM Rob Stapper wrote: > Hi Cristian, > > > > When I add the username,

[basex-talk] http:sent-request with username, password and auth-method results in improper use msg

2021-06-15 Thread Rob Stapper
Hi Cristian, When I add the username, password,auth-method to a http-request [1] I get an improper use message from BaseX[2]. The message suggest a bug. I hope this helps solving it. Kind regards, Rob [1] http:send-request( ,