Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
11954 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
3667
1
ago 20
17266
0
abr 17
3053
0
sept 24
1132
2
ago 23
4066