2 ms·
So, the way I've usually seen it implemented is that you use a custom media type like `application/vnd.github.commit.json` and then your client is supposed to h
by habitue 4y ago
So, the way I've usually seen it implemented is that you use a custom media type like `application/vnd.github.commit.json` and then your client is supposed to have some knowledge of the media types it understands.
Now that doesn't solve everything, because now you need to know relationship information too. Let's say a link on a mortgage application is `application/vnd.property.address`. Is this the property being purchased, or is this a property in the borrower's address history? The api needs to put an attribute of some kind on the links themselves to explain to a machine what they mean in context.
Humans surfing the web don't need this, they use their brains to understand from context what the link relationship is. And when they get to the new page, they don't need to have a hyper specific format for the exact page shape in order to be able to navigate the page. So while hypermedia is genius for the web, it forces an API developer to do all this insane busywork to make it so a "generic client" (which actually has a bunch of hard coded media types and link types in it) can navigate the API.
There's a reason this never took off