Skip to main content Link Menu Expand (external link) Document Search Copy Copied

To set a Content-Type header to the response.headers.

Example:

# ...

@app.route('/hello')
async def hello_world(request, response):
    response.set_content_type('text/plain')

    return 'Hello, World!'

# ...