Hi,
some more feedback.
* when an exception is thrown, the stack trace is not included in the
output. It may be interesting to have it, at least when the
"verbose exceptions" flag is checked in the config/server page
* the MapResource.handleGet assumes the map returned by getMap()
is modifiable, and tries to put into it the page details as well.
This breaks with the map I return, which happens to be an instance
of Collections.singletonMap(K,V).
More in general, it's probably not good practice since the
resource may not be returning you a newly created hash map each
time.
* using generic maps as resources means the order of generated xml
cannot be controlled (and the same goes for any
generated xml). Which makes me wonder if
we should mandate a best practice of using LinkedHashMap or
some other order preserving map.
As an alternative, I guess it should not be too difficult to
use stuff made up of java collections and java beans, and use
introspection to figure out the fields.
* I noticed that in order to make the type parameter work, one
has to remember and put .{type} at the end of the url...
wondering if this should not be automatic? I did not know I
had to, and I was left wondering why the type param did not
work. Strange enough, I also tried appending ?type=xml to
my request, but the result was still json?
* I see there is no handling for POST type requests, which I
need because I'll have to generate multiple requests
out of a single file upload. Now, in this case I'll
have to return a list of the created resources, which is
fine, but I'm wondering how to deal with the format.
I guess that the same rules as GET might apply, so if you
POST to resource.json you get back a json response,
and if you POST to resource.xml you get back an xml response?
Will keep on trying to use the rest module, may send a
"part three" msg
Cheers
Andrea