Trying to POST to doctype getting update error

Below Update error getting while doing a POST

                    url: "http://localhost:8080/api/resource/"+n.doctypes, 
                    headers :{},
                    body:JSON.stringify({data:{"project_name": "Sai"}}),

                    function(err, res, body) {
                    if(err) {
                            return console.error(err);


{ exc: ‘[“Traceback (most recent call last):\n File \”/home/frappe/frappe-bench/apps/frappe/frappe/\“, line 60, in application\n response = frappe.api.handle()\n File \”/home/frappe/frappe-bench/apps/frappe/frappe/\“, line 116, in handle\n data.update({\nAttributeError: 'unicode' object has no attribute 'update'\n”]’ }

this is resolved. Seems related to Body where data was not fully compatible.