Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
11485 Zobrazení
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šit
Nejlepší odpověď

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šit
Related Posts Odpovědi Zobrazení Aktivita
0
čvc 21
3430
1
srp 20
17010
0
dub 17
2930
0
zář 24
955
2
srp 23
3822