Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
12174 Tampilan
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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Jul 21
3845
1
Agu 20
17431
0
Apr 17
3200
0
Sep 24
1321
2
Agu 23
4285