request.POST
這個方法只會處理content-type為表單類型的請求數據
因此當Content-Type=application/json
時,我們取request.POST
只會得到一個空的QueryDict
request.body
request.body
取出來是字節碼,需要將其編碼為字符串
當Content-Type=application/json
時,還需要用json.loads
處理得到的json字符串
status=json.loads(request.body.decode('utf-8')).get("fileAuthorId")