[Specifications] Callback based handling of responses

asbjornu has just created a new issue for https://github.com/HydraCG/Specifications:

== Callback based handling of responses ==
In https://github.com/HydraCG/Specifications/pull/132#issuecomment-323815173 @alien-mcl writes:

> Tha major issue I've got with `getCollection` is that the client need's to know ad-hoc that the result is a collection.

I agree that this is an issue. To decouple the request from the response, wouldn't a better design be to handle all responses through a callback instead? Then the request will just follow links in a completely generic way and it's up to the response callback handler to understand the context and how to deal with the different response types.

Thoughts?

Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/138 using your GitHub account

Received on Thursday, 24 August 2017 07:21:51 UTC