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 33[ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage] [ coveralls-badge ]] [ coveralls ] [ ![ Climate] [ code-climate-badge ]] [ code-climate ] [ ![ Dependencies] [ gemnasium-badge ]] [ gemnasium ] [ ![ gittip] [ gittip-badge ]] [ gittip ]
44
55Paginate 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.
67
78## Installation
89
@@ -88,10 +89,10 @@ Then `curl --include` to see your header-based pagination in action:
8889``` bash
8990$ curl --include ' https://localhost:3000/movies?page=5'
9091HTTP/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"
9596Total: 4321
9697# ...
9798```
You can’t perform that action at this time.
0 commit comments