Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
11689 Vizualizări
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?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Did you find any solution to return status code?

It return my given status code in the response json not in the request

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
iul. 21
3517
1
aug. 20
17119
0
apr. 17
2988
0
sept. 24
1010
2
aug. 23
3921