3 ms·
I have to disagree with you. In my opinion it really doesn't matter what the format is. There are tons of formats that could be used. If you want return some i
by panick21_ 5y ago
I have to disagree with you. In my opinion it really doesn't matter what the format is. There are tons of formats that could be used.
If you want return some information that says why something is not available, you could do that in multiple different ways.
You could either simply return a piece of information that say 'Account below 0' or you could return a the link and suggest the client could do a HEAD against the endpoint.
It seems you have taken the example given here to literal.
Sometimes it totally correct not to want to return something the client can't do. The client doesn't always need an explanation why something is not available. Many clients should even know that something should be available.
If you always return all the reason for everything you are also leaking information.
> The industry has rejected HATEOS not because we were too stupid understand how awesome it is; we've rejected it because we do understand how awesome it isn't.
The reason is in my opinion that the extra effort required is often not worth it because most companies control the client and the server and simply evolve them together. HATEOS is most effective when you want to have multiple clients that all evolve separately.