0

May I know where am I going wrong in fastapi

from fastapi import FastAPI, Response
import json
import uvicorn
app = FastAPI()

@app.get("/")
async def root():
    Response(content=json.dumps({"message": "hi"}), status_code=200, media_type='application/json')

if __name__ == '__main__':
    uvicorn.run(app, host="0.0.0.0", port=8080)

I am getting null as output

0 Answers0