콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
11946 화면
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

아바타
취소
관련 게시물 답글 화면 활동
0
7월 21
3657
1
8월 20
17260
0
4월 17
3037
0
9월 24
1128
2
8월 23
4063