1. 程式人生 > >Django中使用POST提交和接收資料

Django中使用POST提交和接收資料

POST表單資料

請求頭引數

"Content-type": "application/x-www-form-urlencoded"

Django接收資料

request.POST

POST json資料

請求頭引數

"Content-type": "application/json"

Django接收資料

json.loads(request.body)

參考
django中使用POST方法 獲取POST資料