Re: Re: Internet-Draft: JSON Hypertext Application Language
Mike Kelly <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CANqiZJZPymb9+V=7h3jFKQh6JTSSC-dceZyBHX2ejQLeg05rqw@mail.gmail.com> |
Hi Dan, cil On Mon, Jun 11, 2012 at 1:39 PM, Dan Haywood <[email protected]> wrote: > jumping in... > > On 11 June 2012 13:27, Mike Kelly <[email protected]> wrote: >> >> >> >> >> The other approach is to add a profile link to each of the resources >> which points to a URI which works much the same way as the link >> relation type above i.e. inferring info/state/semantics. >> > > but doesn't that require the client having to consume the entire doc first? Yes it does, which may or may not be suitable for your use case. Of course, this isn't something the first option suffers from. > > ~~~ > As a third option, how about using a "profile" parameter, as per the idea in > [1], ie: > > Content-Type: application/hal+json;profile="com.mycompany.myapp.Order" > Sure that's also possible. fwiw, I generally try to avoid putting app-specific things like this in the headers because they "take more effort to get at", and intermediaries can do nasty things with the headers which will introduce bugs in your app. Cheers, M