Created
October 24, 2009 16:53
-
-
Save hassy/217624 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Start with an empty db. | |
| URL with("http://localhost:8080/?action=select&op=pairs") fetch | |
| // ==> [] | |
| URL with("http://localhost:8080/dir1?action=mkdir") fetch | |
| URL with("http://localhost:8080/dir1/?action=write&key=k1") post("k1_val") | |
| URL with("http://localhost:8080/?action=select&op=pairs") fetch | |
| // ==> [["dir1",{"k1":"k1_val"}]] | |
| // Now create a key and an empty container | |
| URL with("http://localhost:8080/?action=write&key=k") post("k_val") | |
| URL with("http://localhost:8080/?action=select&op=pairs") fetch | |
| // ==> [["dir1",{"k1":"k1_val"}],["k",{}]] | |
| URL with("http://localhost:8080/?action=read&key=k") fetch | |
| // ==> "k_val" | |
| URL with("http://localhost:8080/dir2?action=mkdir") fetch | |
| // Can't tell the difference between a key and an empty container: | |
| URL with("http://localhost:8080/?action=select&op=pairs") fetch | |
| // ==> [["dir1",{"k1":"k1_val"}],["dir2",{}],["k",{}]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment