소스 검색

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