flask.Response.set_data

Response.set_data(value)

Sets a new string as response. The value set must either by a unicode or bytestring. If a unicode string is set it’s encoded automatically to the charset of the response (utf-8 by default).

New in version 0.9.