Changes

Jump to navigation Jump to search
180 bytes added ,  23:27, 3 October 2011
===GET Requests===
All query parameters that have not been handled processed before will be treated as variable assignments:
Query; Examples * The following request binds a single variable to the query to be processed:<br/>Request: <code>http://localhost:8984/rest?query=$text&text=Hello+World</code> * The following request assigns two variables to a server-side query:<br/>Request: <code>http://localhost:8984/rest/db/query.xq&a=21&b=2</code>
<pre class="brush:xquery">
declare variable $x a as xs:integer external;declare variable $b as xs:integer external;$x* $y
</pre>
Parameters::Assign the variable with: <code>&x=21</code> Complete request (compact notation, omitting the optional variable declaration)::<code>http://localhost:8984/rest?query=$x&x=21</code> Variables can also be explicitly prefixed with a dollar sign (<code>$</code>); this way, those variables can be bound as well that have the same name as static parameters would otherwise be interpreted in a different way (e.g.: <code>$method</code>).
===POST Requests===
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu