All TWiki scripts handle a contenttype parameter to set the content-type, e.g.
contenttype=application/rss+xml
. The rest script should do the same.
--
PTh
Not totally sure what you mean here; the rest script will not normally generate a response with a status code set to something like 200 (success) or 500 (failure). If a rest function is going to respond with something else - e.g. a block of XML - then that will be handled in the rest function itself. The
bin/rest
script should not try to second-guess how it is being used. Yes, I know about the
endPoint
parameter, but this is something we kept for compatibility; it's really not the way rest scripts should be used (it should be deprecated).
If you can give a real use-case for the content-type of the page response to be handled by
bin/rest
, then it would be a good idea to open a discussion on Codev and propose an enhancement. I don't see this as a code bug, though the documentation could do with improvement so I'm redirecting this to Documentation.
CC