Skip to content

Instantly share code, notes, and snippets.

@jims3ne1
Last active October 11, 2015 21:28
Show Gist options
  • Save jims3ne1/3921895 to your computer and use it in GitHub Desktop.
Save jims3ne1/3921895 to your computer and use it in GitHub Desktop.
curl api with pagination headers
curl -i http://sample.dev/api/movies?page=2
HTTP/1.1 200 OK
Link: <http://sample.dev/api/movies?page=1>;rel="first">,<http://sample.dev/api/movies?page=24>;rel="last">,<http://sample.dev/api/movies?page=3>;rel="next">,<http://sample.dev/api/movies?page=1>;rel="prev">
Content-Type: application/json; charset=utf-8
X-UA-Compatible: IE=Edge
ETag: "844a833583c5a4e4b166077c95b0bb69"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: cc557a8cbfd845cfeaac35f8e8dd0356
X-Runtime: 0.439414
Connection: close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment