Changes

Jump to navigation Jump to search
80 bytes added ,  22:51, 17 March 2012
==Constraints==
Constraints restrict the service HTTP requests that a resource function may process.
===Paths===
 
A resource function must have a single ''Path Annotation''. It will be called if a URL matches the path segments and templates specified as argument. ''Path templates'' contain variables in curly brackets, and map path values to arguments of the function. The following example represents a path annotation with three segments and two templates:
<pre class="brush:xquery">%rest:path("/a/path/{$with}/some/{$variable}")</pre>
If a URL matches the given pattern, variables (in curly brackets) will be assigned. The variables serve as input arguments for the function. The type will be converted, as defined by the function.
<!-- TODO how matching works -->
A function must have <strong>exactly one</strong> path annotation.
===HTTP Methods===
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu