fastapi.Response() not returning customized response

后端 未结 0 2023
余生分开走
余生分开走 2021-02-06 18:57
api = fastapi.FastAPI()

@api.get(\'/api/sum\')

def caculate(z):

    if z == 0 :
        return fastapi.Response(content = {\'Error\' : \'Z must be an integer\'},
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题