How to write or update data in erpnext using curl?

curl -H “Content-Type: application/json” -X POST -d ‘{“subject”:“xyz”}’ https://demo.frappecloud.com/api/resource/Task/

Error while posting

Traceback (innermost last):
File “/home/frappe/press/benches/1504171238/apps/frappe/frappe/app.py”, line 54, in application
response = frappe.api.handle()
File “/home/frappe/press/benches/1504171238/apps/frappe/frappe/api.py”, line 98, in handle
data = json.loads(frappe.local.form_dict.data)
File “/usr/lib64/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

We are using postman for api testing

Login is successful

Read API is working

On the write API I tried the example https://frappe.io/help/rest_api for CRUD create person and getting the below error.

Please can you telling me were i’m going wrong ?

I can neither see the response code nor the response text.

Please Check

Works for me

Hey , Thanks for the support , it works now.