Skip to Content
Menu
This question has been flagged
1 Reply
13637 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
4299
1
Aug 20
17976
0
Apr 17
3575
0
Sep 24
1722
2
Aug 23
4843