Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
11978 Представления
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?

Аватар
Отменить
Лучший ответ

Hi,

Did you find any solution to return status code?

It return my given status code in the response json not in the request

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
июл. 21
3696
1
авг. 20
17295
0
апр. 17
3073
0
сент. 24
1170
2
авг. 23
4094