Skip to Content
Menu
This question has been flagged
1 Odpoveď
13639 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
4300
1
aug 20
17977
0
apr 17
3575
0
sep 24
1723
2
aug 23
4844