跳至內容
選單
此問題已被標幟
1 回覆
11618 瀏覽次數
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
3489
1
8月 20
17080
0
4月 17
2966
0
9月 24
996
2
8月 23
3891