Resource DemosThe following demos shows how to use JavaScript (in your browser) to communicate with Prudence resources. Each resource is implemented in a different programming language, and each has its own state, which is a JSON object. Press a verb button to activate. Note that other people may be playing with this demo at the same time as you are, in which case you might see their changes reflected in your results! (It may be even possible to use this side effect for a terribly geeky chat app...) Post (update) only changes keys that you specify in the JSON object, while leaving the others intact. Put (create) replaces the entire object. The source code demonstrates how to synchronize data between threads using a read-write lock protocol for scalable performance. Note that PHP cannot at this time be used for creating REST resources. |
Resource
MIME to request (for Get, Post and Put)
JSON to send (for Post and Put)
Verbs:
|
Result of last verb

