Sylvain wrote:
> benchline wrote:
> > I have a need to create a page that, based on the
> > arguments passed into it, will return different
> > Content-Type headers (either text/xml or
text/html).
>
> Well you simply set the right Content-Type within your
page handler.
>
> For instance:
> cherrypy.response.headers['Content-Type'] = 'text/xml'
...and if you wanted to go a step further and actually use
HTTP the way it was designed, you could switch on the Accept
header insted of 'arguments'. See cherrypy.tools.accept in
3.0.
Robert Brewer
System Architect
Amor Ministries
fumanchu amor.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|