And though it's other features have nothing to do with REST, it also allows you to browse to templated URIs (level 1 variable expansion only), PUT and POST data through the browser, see titles and descriptions/instructions for the resources you are manipulating, and generally let you use the full range of HTTP's capabilities like I think we all wish Web browsers could.
On Thu, Oct 18, 2012 at 6:09 PM, Dave Gauer <ratf...@gmail.com> wrote:
>
> Hi Mike,
>
> Thanks, yes, I did indeed run across your HAL browser partway through. In
> fact, I almost stopped my own work when I saw it because of the similarity,
> but was having too much fun to stop. :-)
>
> The thing that really stuck out for me with HAL was your concept of embedded
> resources. They're a very clever idea and I like them a lot. And forgive
> me for having not figured out the answer myself, but does HAL provide a way
> to describe all of the HTTP methods available for a given resource? I
> didn't see that ability at the time and it was one of my own requirements
> for the actual product API for which I'm planning to use hm-json.
I'm glad you like the embedded resources idea, it's something that not
everyone is keen on so it's nice to hear from someone else that thinks
its a good idea :)
No I didn't include http methods in HAL. You could add it in for your
use-case but it would be non-standard. Out of interest; what do you
need it for?
> I do have one other question for you: have you gotten much feedback from
> strong REST purists about the RESTfulness of HAL? Most of my reading has
> only turned up negative examples, API designs that don't meet full REST
> requirements for one reason or another. It seems pretty rare that anyone
> comes forth and says, "this is real REST!" about anything. Has Dr. Fielding
> put too much fear into everyone?
Fwiw, I've had an example hal+json API up for a while now and I'm yet
to be told it's not RESTful :)
http://haltalk.herokuapp.com/
There's also the google group which has ~120 people on it and again
nobody has questioned the RESTfulness of HAL there either:
https://groups.google.com/group/hal-discuss
> As for your chicken-and-egg question about the genesis of the "hypermedia"
> property: I imagined the browser first, but began writing examples of the
> hypermedia property before writing a single line of the browser code. They
> both grew up together. It's been a quick project, so I guess you could just
> say it happened all at once.
Interesting.. thanks for sharing that bit of back story. Let me know
how you get on, is this a public API?