File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage] [ coveralls-badge ]] [ coveralls ] [ ![ Climate] [ code-climate-badge ]] [ code-climate ] [ ![ Dependencies] [ gemnasium-badge ]] [ gemnasium ] [ ![ gittip] [ gittip-badge ]] [ gittip ]
4
4
5
5
Paginate in your headers, not in your response body.
6
+ This follows the proposed [ RFC-5988] ( http://tools.ietf.org/html/rfc5988 ) standard for Web linking.
6
7
7
8
## Installation
8
9
@@ -88,10 +89,10 @@ Then `curl --include` to see your header-based pagination in action:
88
89
``` bash
89
90
$ curl --include ' https://localhost:3000/movies?page=5'
90
91
HTTP/1.1 200 OK
91
- Link: < http://localhost:3000/movies? page=1> ; rel=" first" > ,
92
- < http://localhost:3000/movies? page=173> ; rel=" last" > ,
93
- < http://localhost:3000/movies? page=6> ; rel=" next" > ,
94
- < http://localhost:3000/movies? page=4> ; rel=" prev" >
92
+ Link: < http://localhost:3000/movies? page=1> ; rel=" first" ,
93
+ < http://localhost:3000/movies? page=173> ; rel=" last" ,
94
+ < http://localhost:3000/movies? page=6> ; rel=" next" ,
95
+ < http://localhost:3000/movies? page=4> ; rel=" prev"
95
96
Total: 4321
96
97
# ...
97
98
```
You can’t perform that action at this time.
0 commit comments