5570Re: [rest-discuss] Correct REST principles
- Dec 1, 2005Hi Roger and Christian,
> If we agree that the sole purpose of a URL is to identify a resource,A query URL (ie. a URL that contains a query path) is useful in a
> then I cannot see why a person would ever use query strings.
> If information needs to be passed to the resource, then you must
> ask "why?" Are you wishing to update a resource? If so, then you
> should POST the information to the resource (and the resource is
> identified using a logical URL without any query strings).
web service for the same reason it is useful in HTML; It allows the
User Agent to construct a URL according to a specification provided by
the Origin Server. The User Agent can then GET the representation
with a high expectation that the URL will be understood and accepted.
I have likened this, in the past, to asking a question of the resource.
This makes sense if the resource that provided the form (input
is the same one the form is submitted to, eg.
<input type="text" name="manufacturer"/>
<input type="text" name="pax_capacity"/>
> But I propose the following: http://[host]///[universe]/[galaxy]/[system]/[planet]/90.0%2012.0
I have also suggested using segment parameters in the past.
This has the advantage that more segments can be used after the params.
In this case I have specified a height or 30000 feet.
- << Previous post in topic Next post in topic >>