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
12132 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
3834
1
srp 20
17411
0
dub 17
3187
0
zář 24
1308
2
srp 23
4276