瀏覽代碼

接收application/json参数

locky 3 月之前
父節點
當前提交
89bb46ae94
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/ReportController.py

+ 1 - 1
Controller/ReportController.py

@@ -22,7 +22,7 @@ class ReportView(View):
     def post(self, request, *args, **kwargs):
         request.encoding = 'utf-8'
         operation = kwargs.get('operation')
-        return self.validation(request.POST, operation)
+        return self.validation(json.loads(request.body), operation)
 
     def validation(self, request_dict, operation):
         response = ResponseObject()