detail":"JSON parse error - Expecting value: line 1 column 1 (char 0)
detail":"JSON parse error - Expecting value: line 1 column 1 (char 0) 在调用接口时返回400错误,详情是 {detail":"JSON parse error - Expecting value: line 1 column 1 (char 0)"} 原因是传送数据的格式有问题,不要使用 , contentType: 'application/json' 就好了 发送Ajax请求用的是reqwest,原来的代码是 postBill ( ) { let self = this ; let token = getQueryVariable ( 'token' ) ; this . userToken = token ; let addFamily = 0 ; if ( self . is_add_to_family ) addFamily = 1 ; if ( token ) { reqwest ( { url : 'http://127.0.0.1:8000/api/v1/bill/Income/?token=' + token , method : "POST" , type : 'json' , contentType : 'application/json' , data : { bill_type :