diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index d0e04254..cd114ae6 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -534,13 +534,14 @@ GitHub uses these for `pagination `_ >>> url = 'https://api.github.com/users/kennethreitz/repos?page=1&per_page=10' >>> r = requests.head(url=url) - >>> print r.headers['link'] - ... - 'x-ratelimit-remaining': '4995' - 'x-ratelimit-limit': '5000' - ... + >>> r.headers['link'] + '; rel="next", ; rel="last"' -Requests will automatically parse these link headers and make them easily consumable: +Requests will automatically parse these link headers and make them easily consumable:: + >>> r.links['next'] + 'https://api.github.com/users/kennethreitz/repos?page=2&per_page=10' + >>> r.links['last'] + 'https://api.github.com/users/kennethreitz/repos?page=6&per_page=10'