Hmm the java doc says:
* Specifies the media type of the request and response entities as
* extensions. If only one extension is provided, the extension applies to
* both request and response entities. If two extensions are provided,
* separated by a comma, then the first one is for the request entity and
* the second one for the response entity.<br>
But if I annotate 2 separate methods as follows
@Post("xml:json") method1(...)
@Post("xml:xml") method2(...)
and use curl with
1) accept: application/xml
2) accept: application/json
Both requests get handled by method1!
Note the javadoc says separeate request/response with a comma, but the example
uses a colon (:), I tried both and neither works as I expect :(
In terms of design:
1) I wonder can I achieve what I'm trying to do?
Or do I have to do:
@Post("xml:json|xml") oneMethodWithAnIfOrSwitchStatement(...)
2) Why provide a single attribute (value) that restlet has to parse (i.e.
separated by comma/:, separated by |)when multiple attributes would work fine?
any help appreciated,
thanks
Conor
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2583538