How to solve the response header's content-type is change to binary prefix b'text/html; charset=utf-8' issue ?
Content-Type: b'text/html; charset=utf-8'
Please check the following API The API implement is as the following:
from fastapi.responses import HTMLResponse from fastapi import APIRouter service = os.getenv("SERVICE", default = "rechargecoins-api")
.get('/home', response_class=HTMLResponse) async def home(): html_content = "ok1" response = HTMLResponse(content=html_content, status_code=200) return response
I run this API at local is working correctly.
However, deployment to vercel, the response's header is incorrect