Skip to content

Instantly share code, notes, and snippets.

@mikekelly
Created April 17, 2010 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikekelly/369466 to your computer and use it in GitHub Desktop.
Save mikekelly/369466 to your computer and use it in GitHub Desktop.
#(entry point)
> GET /
< 200 OK
< Link: </lists/some-list>; rel="http://example.com/rels/list",
< </foobars/another-list>; rel="http://example.com/rels/list"
< {...}
<html>
<head>
<title>Mikes list application</title>
</head>
<body>
<h1>Mike's lists</h1>
<p>Hi, look around my lists (they're linked in the headers)</p>
</body>
</html>
--------
> GET /lists/some-list
< 200 OK
< Link: </items/asdf123>; rel="http://example.com/rels/item",
< </items/asdkjhyz>; rel="http://example.com/rels/item",
< </pebbles/87asdas90>; rel="http://example.com/rels/item",
< </monkies/123>; rel="http://example.com/rels/item"
< Content-Type: text/html
<html>
<head>
<title>Some List</title>
</head>
<body>
<p class="description">This is my most important list</p>
<p class="last_updated">01-01-2010</p>
</body>
</html>
-------
> GET /items/asdf123
< 200 OK
< Link: </some-list>; rel="http://example.com/rels/listedBy"
< Content-Type: text/html
<html>
<head>
<title>Page of random gibberish</title>
</head>
<body>
<p class="something">foobar</p>
<p class="another_special_thing">some random info</p>
<p class="funk">monkey</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment