You are here: Foswiki>Tasks Web>Item1986 (14 Mar 2011, ArthurClemens)Edit Attach
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

Closing this. The CommandAndCgiScripts topic defines which scripts accept contenttype.

-- GeorgeClark - 14 Mar 2011

ItemTemplate edit

Summary rest script does not grok contenttype
ReportedBy TWiki:Main.PeterThoeny
Codebase
SVN Range Mon, 27 Mar 2006 build 9563
AppliesTo Engine
Component Documentation
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r6 - 14 Mar 2011, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy