Last active
December 27, 2015 12:48
-
-
Save mamund/7328055 to your computer and use it in GitHub Desktop.
links v hypermedia in JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// *** links | |
// just give me the URLs | |
{ "links" : [ | |
"http://example.com/home", | |
"http://example.com/logo.ong" | |
] | |
} | |
// *** hypermedia | |
// give me: | |
// - URL | |
// - identifier | |
// - how to treat the URL (navigate v. embed | |
// - NOTE *assume* HTTP.GET here (might make that explicit, too | |
{ "links" : [ | |
{"rel" : "home", "href" : "http://example.com/home", "render" : "navigate" }, | |
{"rel" : "logo", "href" : "http://example.com/logo.png", "render" : "embed" } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment