Hello Allen,
this behaviour is the default for the query (see
http://en.wikipedia.org/wiki/Percent-encoding). If you want to get the
"+" sign, than you have to decode it with "|%2B"|
best regards
Stephan
Allen schrieb:
I'm trying to use restlet to parse something an URL like this:
http://localhost/test?time=2008-01-03T08:30:00+05:30
However, when use the request object to parse the URL:
Request request = new Request();
request.setResourceRef("http://localhost/test?time=2008-01-03T08:30:00+05:30");
System.out.println(
request.getResourceRef().getQueryAsForm().getFirstValue("time",true));
I get:
2008-01-03T08:30:00 05:30
Notice that the + sign has been replaced by a space and that is causing me a lot
of trouble. Can anyone tell me if it is by design and I should work around it by
replacing the space with + sign again, or is it a defect that should be fixed?
Thanks!