فهرست منبع

接收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()