Sure.  You can get it from the WSGI environment:
https://docs.pylonsproject.org/projects/webob/en/stable/reference.html#response-as-a-wsgi-application

Or you can manually set attributes or headers in the response object.
https://docs.pylonsproject.org/projects/webob/en/stable/api/response.html

--steve


On 7/22/17 at 4:15 PM, [email protected] pronounced:

The following example does not have the protocol info, e.g. 'HTTP/1.0'. Is there a way to add such info?

$ cat main.py #!/usr/bin/env python
# vim: set noexpandtab tabstop=2 shiftwidth=2 softtabstop=-1 fileencoding=utf-8:

from webob import Response
res = Response()
print str(res)

$ ./main.py 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 0


------------------------
Steve Piercy, Soquel, CA

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/r473Ps-10125i-5328718B853E413D8C53E1FE5E9D7E11%40Steves-iMac.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to