[rest-practices] Use of URI templates for query representation

Eoghan Glynn eglynn at redhat.com
Tue May 25 12:49:04 UTC 2010


On Tue, 2010-05-25 at 08:30 -0400, Bryan Kearney wrote:

> 
> How do you see this working in the client? I tend to not be opposed to 
> hiding the url.. but I am curious how this would look.


For example python client usage (with the googlecode uri-template
library to do the parsing), see testQuery() in http://bit.ly/python-test

For example Java client usage (with the Apache Abdera template support
to the parsing), see getBaseUri() in http://bit.ly/cli-client

In both cases, the templated URI is returned via a Link header in the
response to a HEAD request on an entry-point URI. The template URI is
not completely opaque to the client, as it needs to know the query
parameter and substitution variable name (though the latter would be
eliminated in the latest version of the URI template draft).

Cheers,
Eoghan   




More information about the rest-practices mailing list