Hi Piyush,
> I couldn't find any such method in b18 is it in b19?
Actually, the method you are looking for is probably
myCall.getResourceRef().getQueryAsForm().getFirstValue("key1")
which returns the (first) parameter value as a string instead of an instance
of Parameter. Check org.restlet.data.ParameterList for other methods.
> There is a method Parameter get(int) and it throws IOException.
Can you provide a sample URI with the query string that caused this
exception, and the stack trace? I'll fix it ASAP and will add a unit test to
cover this if necessary.
> If we need to attract some servlet developers later-on maybe it is
> wise to have a method like getParameter() this will help in
> transition from servlets to restlets.
I'm afraid that, if we start providing shortcuts in Call for methods related
to the "resourceRef" property, we will have to do it for many one like
getRequestURI(), getQueryString(), getPathInfo(). I'm also relunctant
because it is ambiguous as we assume "resourceRef", but it could also be
"redirectRef", "referrerRef", "relativeRef" or "baseRef", other references
associated to a Call instance.
Best regards,
Jerome
> -----Message d'origine-----
> De : Piyush Purang [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 21 septembre 2006 10:29
> À : [email protected]
> Objet : Re: b19 - Call converters
>
> Sorry I was way too quick for myself ...
>
> There is a method Parameter get(int) and it throws IOException.
>
>
> On 9/21/06, Piyush Purang <[EMAIL PROTECTED]> wrote:
> > Hi Jerome,
> >
> > > There is a programmatic way to get this:
> > > Call.getResourceRef().getQueryAsForm().get("key1")
> >
> > I couldn't find any such method in b18 is it in b19? Only
> one that resembles is
> >
> > String get(int)
> >
> > If we need to attract some servlet developers later-on maybe it is
> > wise to have a method like getParameter() this will help in
> > transition from servlets to restlets.
> >
> > Tutorial needs an example too.
> >
> > Cheers
> > Piyush
> >
>
>