Hypertext Application Language: Difference between revisions

Content deleted Content added
Format code samples
Tags: nowiki added Visual edit
No edit summary
Line 9:
 
==Example==
General Resource
<pre>
{
"_links": {
Line 19 ⟶ 20:
"name": "HAL Cookbook"
}
</pre>
Embedded resource
<pre>
{
"_links": {
Line 40 ⟶ 43:
"name": "HAL Cookbook"
}
</pre>
Collections
<pre>
{
"_links": {
"self_links": {
"self": {
"href": "<nowiki>http://example.com/api/book/hal-cookbook</nowiki>"
},
"next": {
"href": "<nowiki>http://example.com/api/book/hal-case-study</nowiki>"
},
"prev": {
"href": "<nowiki>http://example.com/api/book/json-and-beyond</nowiki>"
},
"first": {
"href": "<nowiki>http://example.com/api/book/catalog</nowiki>"
},
"last": {
"href": "<nowiki>http://example.com/api/book/upcoming-books</nowiki>"
}
},
"_embedded": {
"author": {
"_links": {
"self": {
"href": "<nowiki>http://author-example.com</nowiki>"
}
},
"id": "shahadat",
"name": "Shahadat Hossain Khan"
}
}
"id": "hal-cookbook",
"name": "HAL Cookbook"
}
</pre>
 
==See also==
* [[HATEOAS]]