Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
11536 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
3440
1
ago 20
17031
0
abr 17
2939
0
sept 24
966
2
ago 23
3837