Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4757 มุมมอง

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)
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

ex

@http.route(['/api/XXX/auth/token'], methods=['POST'], type='json', csrf=False, auth="public")
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
2933
0
มี.ค. 15
4408
1
มี.ค. 15
8247
1
มี.ค. 15
5393
2
ก.ค. 25
1047