跳至内容
菜单
此问题已终结
1 回复
12131 查看
from odoo.http import Response, Controller


class Example(Controller):
     @http.route("/example/", methods=["POST"], type="json", auth="public", csrf=False)
     def example(self):
         return Response("Testing 403", status=403)


Above code seems to return code 200, how can I specify return code?

形象
丢弃
最佳答案

Hi,

Did you find any solution to return status code?

It return my given status code in the response json not in the request

形象
丢弃
相关帖文 回复 查看 活动
0
7月 21
3834
1
8月 20
17411
0
4月 17
3187
0
9月 24
1308
2
8月 23
4276