跳至內容
選單
此問題已被標幟
1 回覆
4735 瀏覽次數

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")
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
2928
0
3月 15
4396
1
3月 15
8240
1
3月 15
5387
2
7月 25
1011