Explorar o código

接收application/json参数

locky hai 3 meses
pai
achega
89bb46ae94
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()