Hello Nicho, you can use Reference.decode(String) to get the proper value without URL encoding chars in it.
On Thu, Oct 28, 2010 at 10:53 AM, <[email protected]> wrote: > I am trying to transfer a String with space character inside to server, but > server side can not retrieve it properly. for example, if I send the string > of London City, then server will display as London+City. > > How can I retrieve the String properly from server side? > > my client code is: > > String roleURL = "https://myserver/CITY/city=London City"; > Client c = new Client(Protocol.HTTPS); > Request request = new Request(Method.GET, new Reference(roleURL)); > Response response = c.handle(request); > > my server code is: > > Router router = new Router(getContext()); > router.setDefaultMatchingMode(org.restlet.util.Template.MODE_EQUALS); > router.attach("/{cityParameters}", ResourcesSearchResource.class); > > > the code of ResourceSearchResource.java is > > String cityParameters = (String) > getRequest().getAttributes().get("cityParameters"); > > > but when I try to display cityParameters, it displayed as city=London+City. > How can I retrieve it properly as city=London City. > > Thanks in advance, > > Nicho > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2676603 > -- Fabián Mandelbaum IS Engineer ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2676669

