Examples of how to construct Restlet applications mentioned in Restlet Tutorials
For example groovy scripts, see http://svn.codehaus.org/groovy-contrib/groovyrestlet/trunk/src/test/groovy/org/lpny/groovyrestlet/examples/tutorials/
Example about creating a Restlet Client instance.
You can use shortcut
client constructor as shown in `#1`; also you can use the generic
restlet constructor to create client instance.
At current moment, server construction does not support `restlet` way
Nesting here indicates a parent-child relationship.
By default any nested component will be automatically attached to its parent component according to their parent-child relationship. Here Guard is automatically attached to its parent (Application here) as its root. Adding attribute
autoAttach:false can disable this feature.
In Restlet, an attaching operation (on Router.attach) returns an instance of Route. It might be needed to do some post processing on a route. Attribute
postAttach which refers a closure is used to support this.
Same as handle closure of a Restlet, you can implement a simple Restlet Resource using groovy closures. Following attributes are supported:
represent(Variant)methods HTTP GET
storeRepresentation()method HTTP PUT
remoteRepresentation()method HTTP DELETE
acceptRepresentation()method HTTP POST