Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
11553 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
3456
1
Agu 20
17046
0
Apr 17
2945
0
Sep 24
976
2
Agu 23
3842