Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
12015 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
3718
1
ago 20
17333
0
abr 17
3103
0
sept 24
1198
2
ago 23
4142