HTTP Link Hints #1
Replies: 1 comment 1 reply
-
I'm seeing a lot of similarity here with what OpenAPI descriptions provide. {
"_links": {
"self": {
"href": "/orders/523",
"hints": {
"allow": ["GET", "POST"],
"accept-post": {
"application/example+json":
{}
}
}
}
}
} it would look like {
"_links": {
"self": {
"href": "/orders/523",
"hints": {
"get": {},
"post": {
"requestBody": {
"content" : {
"application/example+json" : {}
}
}
}
}
}
}
} For sure the OpenAPI is bigger and uglier, but it also supports a lot more capabilities than are currently described in the draft. If we go down the path of defining additional hints over time, how long before we have two ugly things that are inconsistent. When you use the constraint "just for HTTP interactions", is that saying that any attempt to describe the shape of the payload would be avoided? That would be a clean distinction. However, the pressure I have seen before to describe "forms" suggests to me that hints for payload shape would soon be in demand. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The high level idea is that links (as per RFC8288) often need to give hints about how to interact with the resources that they point to. HTTP has several ways to discover this as you interact with them (e.g., the
Allow
header for methods,Accept
for formats, and so forth), but not any way to write that down separately.HTTP Link Hints aims to fill that gap, by specifying a set of link target attributes that describe how to interact with the resource with HTTP. A couple of important points to note:
See the Internet-Draft proposal for details.
Beta Was this translation helpful? Give feedback.
All reactions