RE: how to use conditional get in restlet ?

2011-06-16 Thread layal Al Ait
Thank you so much for your quick reply.

In this case the router will attach this uri to the people resource class.
Are there any functions that could parse the uri and get the needed request (in 
this example, age>20) ? or should I write my own functions ?

Another issue, in this example, the query ( age>20 ) is simple, so it could be 
included in the uri,
what if I have complex queries (union between two tables ..etc ) ?

Thank you in advance ! 


> Subject: Re: how to use conditional get in restlet ?
> From: stinkym...@gmail.com
> Date: Wed, 15 Jun 2011 21:22:12 -0400
> CC: l@hotmail.com
> To: discuss@restlet.tigris.org
> 
> I'm moving this to the disc...@restlet.itgris.org, the code list is more for 
> the restlet codebase itself. 
> 
> Anyhow, the answer to your question is two-fold:
> 
> First, "Conditional Get" means something very specific in HTTP parlance and 
> it isn't what you describe.  A conditional get is a GET request that sends a 
> special header that tells the server to not bother to send a response if the 
> resource that is being requested hasn't been modified since the last time the 
> client made the request.  So it isn't really for what you're talking about.
> 
> So, to do what you'd like to do, just use a query parameter.  For example:
> 
> http://www.example.com/people?age=over20
> 
> -Matt
> 
> 
> On Jun 15, 2011, at 4:08 PM, infoSyS wrote:
> 
> > I am currently designing an API using the restlet framework; Can anyone
> > please give me a clue on how to use conditional GET requests in RESTlet ?
> > what I mean is : lets say I have the name and date of birth of many persons
> > and I want to GET the name of persons that are older than 20 years, how
> > could this be done ? Thanks in advance.
> > 
> > --
> > View this message in context: 
> > http://restlet-code.1609877.n2.nabble.com/how-to-use-conditional-get-in-restlet-tp6480367p6480367.html
> > Sent from the Restlet Code mailing list archive at Nabble.com.
> > 
> > --
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2766359
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2767323

Re: how to use conditional get in restlet ?

2011-06-15 Thread Matt Kennedy
I'm moving this to the disc...@restlet.itgris.org, the code list is more for 
the restlet codebase itself. 

Anyhow, the answer to your question is two-fold:

First, "Conditional Get" means something very specific in HTTP parlance and it 
isn't what you describe.  A conditional get is a GET request that sends a 
special header that tells the server to not bother to send a response if the 
resource that is being requested hasn't been modified since the last time the 
client made the request.  So it isn't really for what you're talking about.

So, to do what you'd like to do, just use a query parameter.  For example:

http://www.example.com/people?age=over20

-Matt


On Jun 15, 2011, at 4:08 PM, infoSyS wrote:

> I am currently designing an API using the restlet framework; Can anyone
> please give me a clue on how to use conditional GET requests in RESTlet ?
> what I mean is : lets say I have the name and date of birth of many persons
> and I want to GET the name of persons that are older than 20 years, how
> could this be done ? Thanks in advance.
> 
> --
> View this message in context: 
> http://restlet-code.1609877.n2.nabble.com/how-to-use-conditional-get-in-restlet-tp6480367p6480367.html
> Sent from the Restlet Code mailing list archive at Nabble.com.
> 
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2766359

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2766749