This is the code import requests import datetime
now = datetime.datetime.now()
# print(now) data = {'ticket_id':'CH-12345','response_code':200,'service':'Ec2','problem_type':'server_down','time':now}
headers = { 'Content-Type': 'application/json' } response = requests.post('https://localhost:8089/servicesNS/nobody/TA-cherwell-data-pull/storage/collections/data/cherwell_data' ,headers=headers ,data=data, verify=False , auth=('admin' , 'changeme'))
print(response.text)
This is the error I am getting <msg type="ERROR">JSON in the request is invalid. ( JSON parse error at offset 1 of file "ticket_id=CH-12345&response_code=200&service=Ec2&problem_type=server_down&time=2022-08-31+20%3A28%3A53.237962": Unexpected character while parsing literal token: 'i' )</msg> Please let me know if you need any more help
... View more