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
13151 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
4050
1
srp 20
17685
0
dub 17
3368
0
zář 24
1533
2
srp 23
4549