Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
11217 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
3364
1
ago 20
16951
0
abr 17
2873
0
sept 24
889
2
ago 23
3748