Skip to Content
Menu
This question has been flagged
1 Reply
13199 Views
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
Discard
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
Discard
Related Posts Replies Views Activity
0
Jul 21
4077
1
Aug 20
17714
0
Apr 17
3385
0
Sep 24
1567
2
Aug 23
4587