기본 콘텐츠 유형: text/plain; charset=utf-8 설명: 일반 텍스트를 반환
from sanic.response import text
@app.route("/")asyncdefhandler(request):return text("Hi 😎")
기본 콘텐츠 유형: text/html; charset=utf-8 설명: HTML 문서를 반환
from sanic.response import html
@app.route("/")asyncdefhandler(request):return html('<!DOCTYPE html><html lang="en"><meta charset="UTF-8"><div>Hi 😎</div>')
기본 콘텐츠 유형: application/json 설명: JSON 문서를 반환
from sanic.response import json
@app.route("/")asyncdefhandler(request):return json({"foo":"bar"})