Hello,
I am having problem using POST request on my frappe cloud website. GET requests work good.
I have the following code. It shows response 200 on the terminal but do not create the new ‘todo’ task on the page. I test this same code on my localhost erpnext, and it works fine. Need Help figuring this out. Thanks in advance!!
import requests
import json
url = "http://{my_cloud_address}.erpnext.com/api/resource/ToDo"
request = requests.post(url, data=json.dumps({"description":"New ToDo"}), headers={"Accept": "application/json","Content-Type": "application/json","Authorization": "Token 2a17c37de8470ef:xxxxxxxxxxxxxxxxxx"})
print(request.status_code)
print(request.json)
Response to the above is as follows:
"
200
<bound method Response.json of <Response [200]>>
"