Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active July 31, 2018 19:54
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 chelseatroy/ee8aeb1a74d3217f83f828b1601baac0 to your computer and use it in GitHub Desktop.
Save chelseatroy/ee8aeb1a74d3217f83f828b1601baac0 to your computer and use it in GitHub Desktop.
Example HATEOAS
response to GET 'awesomeprogrammers.com/latanya_sweeney'
{
"name" : "Latanya Sweeney",
"links" : [
"summary" : {
"verb" : "GET",
"url" : "http://latanyasweeney.org",
"authenticate" : false
},
"headshot" : {
"verb" : "GET",
"url" : "http://latanyasweeney.org/Sweeney6.jpg",
"authenticate" : false
},
"twitter" : {
"verb" : "GET",
"url" : "https://twitter.com/latanyasweeney",
"authenticate" : false
},
"update" : {
"verb" : "PUT",
"url" : "awesomeprogrammers.com/latanya_sweeney",
"authenticate" : true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment