...
/Creating a Hypermedia-Based Web Service
Creating a Hypermedia-Based Web Service
Learn how to create a hypermedia-based web service.
We'll cover the following...
Objective
So far, the JSON file we’ve been working with looks something like this:
{
"id" : "item-1",
"name" : "Alf alarm clock",
"description" : "nothing I really need",
"price" : 19.99
}
However, after this lesson, we’ll be looking at the following JSON file:
{
"id" : "item-1",
"name" : "Alf alarm clock",
"description" : "nothing I really need",
"price" : 19.99,
"_links" : {
"self" : {
"href" : "http://localhost:8080/hypermedia/items/item-1"
},
"item" : {
"href" : "http://localhost:8080/hypermedia/items"
}
}
}
Not only will we see snippets for the JSON outputs, but there will also be a separate snippet listing each hypermedia link.
What is hypermedia?
Hypermedia is a concept we’re all familiar with in one form or another. It was hypermedia that revolutionized the internet when Tim ...