コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
11764 ビュー
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
3531
1
8月 20
17143
0
4月 17
2999
0
9月 24
1048
2
8月 23
3951