[Twisted-Python] twisted.web2's equivalent to setHeader?

Cameron Dale camrdale at gmail.com
Thu Apr 24 11:20:48 EDT 2008

On 4/24/08, inhahe <inhahe at gmail.com> wrote:
>             ctx.setHeader("Server", "Apache/2.2.8(Unix)")
>         exceptions.AttributeError: 'Request' object has no attribute
> 'setHeader'
> so how do I set a header using web2?

Try ctx.headers.setHeader(). web2 requests have a headers attribute of
this class:



More information about the Twisted-Python mailing list