Skip to Content
Menu
This question has been flagged
1 Odpoveď
11974 Zobrazenia
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?

Avatar
Zrušiť
Best Answer

Hi,

Did you find any solution to return status code?

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

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
júl 21
3687
1
aug 20
17291
0
apr 17
3071
0
sep 24
1164
2
aug 23
4088