Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
10925 Vistas
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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
jul 21
3235
1
ago 20
16812
0
abr 17
2755
0
sept 24
748
2
ago 23
3531