Changes

Jump to navigation Jump to search
943 bytes added ,  12:49, 11 July 2019
no edit summary
| '''Summary'''
|Returns the Method of the HTTP request.
|}
 
==request:attribute==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|request:attribute|$name as xs:string|xs:string}}
|-
| '''Summary'''
|Returns the value of an attribute of the HTTP request. If the attribute does not exist, an empty sequence is returned.
|-
| '''Example'''
|
* {{Code|request:attribute("javax.servlet.error.request_uri")}} returns the original URI of a caught error.
* {{Code|request:attribute("javax.servlet.error.message")}} returns the error message of a caught error.
|}
| '''Summary'''
|Returns the value of the named Cookie in an HTTP request. If there is no such cookie, an empty sequence or the optionally specified default value is returned instead.
|}
 
=Attribute Functions=
 
==request:attribute-names==
 
{{Mark|Introduced with BaseX 9.3:}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|request:attribute-names||xs:string*}}
|-
| '''Summary'''
|Returns the names of all HTTP request attributes.
|}
 
==request:attribute==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|request:attribute|$name as xs:string|xs:string}}
|-
| '''Summary'''
|Returns the value of an attribute of the HTTP request. If the attribute does not exist, an empty sequence is returned.
|-
| '''Example'''
|
* {{Code|request:attribute("javax.servlet.error.request_uri")}} returns the original URI of a caught error.
* {{Code|request:attribute("javax.servlet.error.message")}} returns the error message of a caught error.
|}
 
==request:set-attribute==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|request:set-attribute|$name as xs:string, $value as item()*|empty-sequence()}}
|-
| '''Summary'''
|Binds the specified {{Code|$value}} to the request attribute with the specified {{Code|$name}}.
|-
| '''Errors'''
|{{Error|attribute|#Errors}} The supplied value cannot be materialized.
|}
 
==request:attribute-names==
 
{{Mark|Introduced with BaseX 9.3:}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|request:attribute-names||xs:string*}}
|-
| '''Summary'''
|Returns the names of all HTTP request attributes.
|}
! width="110"|Code
|Description
|-
|{{Code|attribute}}
|An attribute cannot be retrieved or stored.
|-
|{{Code|parameter}}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu