Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
11525 Visualizações
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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
jul. 21
3437
1
ago. 20
17025
0
abr. 17
2935
0
set. 24
962
2
ago. 23
3832