Skip to content

Commit 6609045

Browse files
committed
Add subheaders to README
1 parent 649f338 commit 6609045

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ To install, add the following to your project `:dependencies`:
1111

1212
[ring/ring-json "0.3.1"]
1313

14+
1415
## Usage
1516

17+
#### wrap-json-response
18+
1619
The `wrap-json-response` middleware will convert any response with a
1720
collection as a body (e.g. map, vector, set, seq, etc) into JSON:
1821

@@ -27,6 +30,9 @@ collection as a body (e.g. map, vector, set, seq, etc) into JSON:
2730
(wrap-json-response handler))
2831
```
2932

33+
34+
#### wrap-json-body
35+
3036
The `wrap-json-body` middleware will parse the body of any request
3137
with a JSON content-type into a Clojure data structure, and assign it
3238
to the `:body` key.
@@ -46,6 +52,8 @@ This is the preferred way of handling JSON requests.
4652
```
4753

4854

55+
#### wrap-json-params
56+
4957
The `wrap-json-params` middleware is an alternative to
5058
`wrap-json-body` for when it's convenient to treat a JSON request as a
5159
map of parameters. Rather than replace the `:body` key, the parsed
@@ -77,6 +85,7 @@ option. Instead, use the standard Ring `wrap-keyword-params` function:
7785
wrap-json-params))
7886
```
7987

88+
8089
## License
8190

8291
Copyright © 2015 James Reeves

0 commit comments

Comments
 (0)