diff --git a/src/pages/guides/python/serverless-rest-api-example.mdx b/src/pages/guides/python/serverless-rest-api-example.mdx index e5f117653..85d6fe76d 100644 --- a/src/pages/guides/python/serverless-rest-api-example.mdx +++ b/src/pages/guides/python/serverless-rest-api-example.mdx @@ -124,7 +124,8 @@ async def get_profile(ctx: HttpContext) -> None: pid = ctx.req.params['id'] d = await profiles.get(pid) - ctx.res.body = f"{d.content}" + ctx.res.body = f"{d}" + ctx.res.headers['Content-Type'] = 'application/json' ``` ### Remove a profile with DELETE