Below Update error getting while doing a POST
this.authConfig.connect(function(){
request.post({
url: "http://localhost:8080/api/resource/"+n.doctypes,
headers :{},
body:JSON.stringify({data:{"project_name": "Sai"}}),
json:true
},
function(err, res, body) {
if(err) {
return console.error(err);
}
console.log(body);
});
{ exc: ‘[“Traceback (most recent call last):\n File \”/home/frappe/frappe-bench/apps/frappe/frappe/app.py\“, line 60, in application\n response = frappe.api.handle()\n File \”/home/frappe/frappe-bench/apps/frappe/frappe/api.py\“, line 116, in handle\n data.update({\nAttributeError: 'unicode' object has no attribute 'update'\n”]’ }