users@jersey.java.net

Re: [rest-discuss] hateoas - draft #1

From: Noah Campbell <noahcampbell_at_gmail.com>
Date: Thu, 15 Oct 2009 10:17:33 -0700

Wouldn't a prior GET return the material to construct a POST or PUT request?
 In HTML, a form is returned with semantics the server will understand. The
same should likely apply to the other media types. With application/xml is
specific to client and server, basically increasing coupling and reducing
adoptability. I might be so bold to say that application/xml is like
"tunneling HATEOAS" in the same way SOAP is tunneling through HTTP.
-Noah

On Thu, Oct 15, 2009 at 10:02 AM, Will Hartung <willh_at_mirthcorp.com> wrote:

> 2009/10/15 Jan Algermissen <algermissen1971_at_mac.com>
> > Sometimes you just need to create a new media type and/or new link
> > relations[1]. If there is 'public relevance' in your use case, your
> > new type might even become a standard type. IOW, don't be afraid to
> > ceate a new type if you have to (but think long and hard if you really
> > have to :-)
>
> Does it make any sense to qualify the link with the verb and the data type?
>
> A client doesn't need to know the content type of a GET, as it can ask
> for what it wants.
>
> But do you think for a PUT or POST, the data type can (should?) be
> referenced in the link?
>
> The Atom link can look like:
> <link href="http://example.com/resource" rel="create"
> type="xml/ubl-invoice"/>
>
> I guess the media types for both POST and PUT should ideally be the
> same, as they're typically closely related. I was just thinking if
> they were different, how would you best communicate that to a client.
>
> And it's up to the standard interface, to know what you can do with
> that media type at that link.
>
> I don't see how you could simply have "xml/application" as a media
> type for most cases, especially for creating or changing resources.
> It's just too generic.
>
> I suppose it's up to the client to "know" what schema
> "xml/ubl-invoice" is, through some internal mapping. Or, the service
> can post a resource that provides the mapping.
>
> Regards,
>
> Will Hartung
> (willh_at_mirthcorp.com)
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/rest-discuss/
>
> <*> Your email settings:
> Individual Email | Traditional
>
> <*> To change settings online go to:
> http://groups.yahoo.com/group/rest-discuss/join
> (Yahoo! ID required)
>
> <*> To change settings via email:
> mailto:rest-discuss-digest_at_yahoogroups.com
> mailto:rest-discuss-fullfeatured_at_yahoogroups.com
>
> <*> To unsubscribe from this group, send an email to:
> rest-discuss-unsubscribe_at_yahoogroups.com
>
> <*> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>