Hi Hiranya, Thanks for the input..
BWT won't this create some limitations.. specially in the API Gateway... For example I can have a resource - where clients can do GET with different optional parameters.. In such case, I need to have a "resource" element for all those combinations with different uri-templates..? Thanks & regards, -Prabath On Fri, Feb 24, 2012 at 1:27 AM, Hiranya Jayathilaka <[email protected]>wrote: > > > On Thu, Feb 23, 2012 at 11:06 PM, Prabath Siriwardena <[email protected]>wrote: > >> This is my configuration.. >> >> <resource methods="POST GET" uri-template="/library/book"> >> >> This will get the following... >> >> GET http://localhost:8280/library/book - and will return the book >> collection.. >> >> But, above configuration won't get hit - when I call it like, >> >> GET http://localhost:8280/library/book?author=hiranya >> >> If I want to handle the above, I need to introduce the following >> configuration.... >> >> <resource methods="POST GET" uri-template="/library/book?author={author}"> >> >> Then once again - if I want to get books by author and book name, I need >> to introduce following.. >> >> <resource methods="POST GET" >> uri-template="/library/book?author={author}&name={name}"> >> >> Is this behavior by design..? Why..? >> > > Yes. This is how the URI template spec expects this to work. > > >> >> Can't we handle all above three scenarios through... >> > > The right template to use would be /library/book{?author,name}. But this > is a level 3 URI template. We don't have full support for level 3 templates > yet (we only support fragment expressions, label expressions and path > expressions so far from the level 3 category). So this won't work in the > current URI templates library. > > Thanks, > Hiranya > > > > > >> >> <resource methods="POST GET" uri-template="/library/book"> >> >> -- >> Thanks & Regards, >> Prabath >> >> Mobile : +94 71 809 6732 >> >> http://blog.facilelogin.com >> http://RampartFAQ.com >> >> >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > > -- > Hiranya Jayathilaka > Associate Technical Lead; > WSO2 Inc.; http://wso2.org > E-mail: [email protected]; Mobile: +94 77 633 3491 > Blog: http://techfeast-hiranya.blogspot.com > > _______________________________________________ > Carbon-dev mailing list > [email protected] > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Thanks & Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
