Okay, I give up. I am trying to post the contents of a file that contains JSON. The contents of the file look like this:
{ \"id”:99999999,
I have done below code while learning Open API and works fine for me.
` import requests url="your url" json_data = {"id":"k123","name":"abc"} resp = requests.post(url=url,json=json_data) print(resp.status_code) print(resp.text) `