Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4731 Lượt xem

Standard behavior:
Allowed only methods: POST, if CORS
Expected behavior:
I want to override the method set_default(self, template=None, qcontext=None, uid=None)
To allow such methods as DELETE, PUT, PATCH etc.,
But when I try to use, for example, method PUT -  nothing happens.
My Case:

@http.route(['/api/v1/detail'], type='json', auth="public", methods=['PUT', 'OPTIONS'], cors='*', csrf=False)
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Try with ['POST'] methods or whatever you want

ex

@http.route(['/api/XXX/auth/token'], methods=['POST'], type='json', csrf=False, auth="public")
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
2928
0
thg 3 15
4394
1
thg 3 15
8239
1
thg 3 15
5387
2
thg 7 25
1006