News for hackers. Stuff that matters.
Re:Who Cares about GET vs. POST? NoREST by dragonwriter on Tuesday March 03, 2015 @02:36PM (#9140062)
HATEOAS provides both discovery and, when well-known content types are used, potentially much richer ready-to-use client code than the autogenerated host-language interfaces provided by SOAP and similar protocols.
Re:Who Cares about GET vs. POST? NoREST by lmm on Tuesday March 03, 2015 @03:17PM (#9140395)
HATEOAS only lets you discover something by going there, so to speak; it doesn't give you a complete index like a WSDL.

At the transport level you get much richer and more structured client code from SOAP. Automated HATEOAS clients are at this point purely theoretical, and anything you could put a content-type on and send over HATEOAS you could equally embed in a SOAP response. If the thing you wanted to embed can be expressed as XML, you can do much better.

Re:Who Cares about GET vs. POST? NoREST by lmorchard on Tuesday March 03, 2015 @03:47PM (#9140621)
Your browser is an "automated HATEOAS client". You can toss it any old HTML doc and it knows what to do with things described in the HTML content-type spec such as links, forms, images, scripts, etc.
Re:Who Cares about GET vs. POST? NoREST by lmm on Tuesday March 03, 2015 @03:54PM (#9140675)
No, the browser is very much a manual HATEOAS client.
Re:Who Cares about GET vs. POST? NoREST by jalfresi on Tuesday March 03, 2015 @05:39PM (#9141289)
Incorrect. When you view a html page, the browser fetches the javascript, css and images in the page automatically.
Re:Who Cares about GET vs. POST? NoREST by dragonwriter on Tuesday March 03, 2015 @03:58PM (#9140705)
> HATEOAS only lets you discover something by going there, so to speak; it doesn't give you a complete index like a WSDL.

HATEOAS doesn't inherently require that you "go" anywhere to get a hypertext document describing an API, and can be as complete as you want. But, since its really designed for web-scale decentralized interlinked APIs, no, its not primarily intended to have one document that gives you every possible linked endpoint.

> Automated HATEOAS clients are at this point purely theoretical

Googlebot is an example of an automated HATEOAS client that handles a wide array of content types. It is decidedly not purely theoretical.

Re:Who Cares about GET vs. POST? NoREST by lmm on Tuesday March 03, 2015 @05:06PM (#9141114)
Googlebot is not an automated HATEOAS client, it's solely an automated web client. Even if the web conformed to all the specifications it would still be an exceedingly atypical example of a HATEOAS API. And googlebot is nowhere near the reliability level that we would require for most use cases.
Re:Who Cares about GET vs. POST? NoREST by dragonwriter on Tuesday March 03, 2015 @05:53PM (#9141353)
> Even if the web conformed to all the specifications it would still be an exceedingly atypical example of a HATEOAS API.

The HTTP-powered Web is the prototypical REST (including the HATEOAS constraint that is part of the definintion of REST) API.

Re:Who Cares about GET vs. POST? NoREST by lmm on Wednesday March 04, 2015 @04:36AM (#9143405)
Then REST is a wrong word, one that doesn't point to a natural empirical cluster. The web is very different from all the other things that are called "REST API"s.
Re:Who Cares about GET vs. POST? NoREST by dragonwriter on Wednesday March 04, 2015 @09:56AM (#9144532)
Most, but not all, "REST" APIs (other than the web) violate at least one element of the definition of REST, most commonly they don't actually implement HATEOAS, requiring out of band knowledge of applicable resource URIs or URI patterns and/or information about data formats not communicated by documentation of media types and hypertext relations.

But that's because REST is often used as a buzzword by people who don't know what the architectural style entails, or aspirationally to describe one goal of the design of an API, but one that may be compromised for conflicting goals.

Re:Who Cares about GET vs. POST? NoREST by LoSboccacc on Wednesday March 04, 2015 @03:09AM (#9143210)
It's not 'discovery' in the sense that you can't discover an url, change an id here and there and build an url for another product. You don't get endpoints for operations, you get operations that are valid only for that particular product and only for that particular state.