Thierry Boileau <thierry.boileau <at> noelios.com> writes:

> 
> 
> Hello prashant>Does restlet API provides some mechanism to
> exaclty match the URI template to corresponding REST URI?
> What do you mean? If you want to define routes based on URI template,
> you can have a look at this 
page:http://www.restlet.org/documentation/1.1/firstResourceif you want to 
provide your own logic of routing, you
> can create a subclass of Router. This class must set the routing mode
> to CUSTOM (in the constructor for example) and implement the
> "getCustom(Request , Response)" method.Best regards,
> Thierry Boileau
> -- Restlet ~
> Core developer ~ http://www.restlet.orgNoelios Technologies ~ Co-founder ~ 
http://www.noelios.com
>   Hi All,
> 
> I have a URI template e.g. "http://foo.com/accounts/{accountID}";
> and corresponding rest URI i.e. "http://foo.com/accounts/9991234";.
> 
> Does restlet API provides some mechanism to exaclty match the URI template 
to 
> correspoding REST URI? I mean to say, can we write our own code to match 
these 
> two? If some one has any idea then please let me know.
> 
> Any comments or inputs are highly appreciated.
> 
> Thanks in advance.
> 
> Please respond ASAP.
> 
> Thanks
> Prashant
> 
Hi Thierry,

Thanks for your quick response.
But this is not what I want. Basically this is how restlet engine matches URI 
templates defined in router. But I want to write my own logic outside this 
restlet engine say in one of my restlet classes.
I can extract request path from request object there but how will I match that 
REST URI with URI template(which I have hardcoded in my Restlet class) in my 
restlet.

Now I hope you understand my point. :-)

thanks
Prashant




Reply via email to