Skip to Content
Menu
This question has been flagged
1 Reply
10867 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
3218
1
Aug 20
16794
0
Apr 17
2718
0
Sep 24
716
2
Aug 23
3494