İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
11741 Görünümler
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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Tem 21
3525
1
Ağu 20
17131
0
Nis 17
2997
0
Eyl 24
1043
2
Ağu 23
3944