Package cherrypy :: Package lib :: Module encoding :: Class ResponseEncoder
[hide private]
[frames] | no frames]

Class ResponseEncoder

source code

Instance Methods [hide private]
 
__init__(self, **kwargs) source code
 
encode_stream(self, encoding)
Encode a streaming response body.
source code
 
encode_string(self, encoding)
Encode a buffered response body.
source code
 
find_acceptable_charset(self) source code
 
__call__(self, *args, **kwargs) source code
Class Variables [hide private]
  default_encoding = 'utf-8'
  failmsg = 'Response body could not be encoded with %r.'
  encoding = None
hash(x)
  errors = 'strict'
  text_only = True
  add_charset = True
  debug = False
Method Details [hide private]

encode_stream(self, encoding)

source code 

Encode a streaming response body.

Use a generator wrapper, and just pray it works as the stream is being written out.