coin_rack 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +23 -21
- data/lib/coin_rack/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -16,43 +16,43 @@ $ coin_rack --run
|
|
16
16
|
|
17
17
|
```bash
|
18
18
|
$ curl --data "value=true" http://localhost:9292/example.json
|
19
|
-
|
19
|
+
{"example":true}
|
20
20
|
|
21
21
|
$ curl http://localhost:9292/example.json
|
22
|
-
|
22
|
+
{"example":true}
|
23
23
|
|
24
24
|
$ curl -X DELETE http://localhost:9292/example.json
|
25
|
-
|
25
|
+
{"example":true}
|
26
26
|
|
27
27
|
$ curl http://localhost:9292/example.json
|
28
|
-
|
28
|
+
{"example":null}
|
29
29
|
```
|
30
30
|
|
31
31
|
#### Prefer XML?
|
32
32
|
```bash
|
33
33
|
$ curl --data "value=true" http://localhost:9292/example.xml
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
35
|
+
<hash>
|
36
|
+
<example type="boolean">true</example>
|
37
|
+
</hash>
|
38
38
|
|
39
39
|
$ curl http://localhost:9292/example.xml
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
41
|
+
<hash>
|
42
|
+
<example type="boolean">true</example>
|
43
|
+
</hash>
|
44
44
|
|
45
45
|
$ curl -X DELETE http://localhost:9292/example.xml
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
47
|
+
<hash>
|
48
|
+
<example type="boolean">true</example>
|
49
|
+
</hash>
|
50
50
|
|
51
51
|
$ curl http://localhost:9292/example.xml
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
53
|
+
<hash>
|
54
|
+
<example nil="true"/>
|
55
|
+
</hash>
|
56
56
|
```
|
57
57
|
|
58
58
|
## URL Definition
|
@@ -121,6 +121,8 @@ http://localhost:9292/example.json
|
|
121
121
|
|
122
122
|
#### Response
|
123
123
|
|
124
|
+
Note the value returned is the value that was deleted.
|
125
|
+
|
124
126
|
```
|
125
|
-
"{\"example\":
|
127
|
+
"{\"example\":true}"
|
126
128
|
```
|
data/lib/coin_rack/version.rb
CHANGED