Skip to Content
Menú
This question has been flagged
1 Respondre
11537 Vistes
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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
0
de jul. 21
3440
1
d’ag. 20
17032
0
d’abr. 17
2940
0
de set. 24
967
2
d’ag. 23
3837