I am trying to write a python script to post data to a Microsoft SQL server database that is connected to restful web service. However, I am getting an error which I do not understand and never came across before.
Python Code to post data:
import json
import requests
import pprint
url = 'http://192.168.1.111/api/Data'
data = {'ID': '1', "ChannelID': '34','TimeStampID': '45'}
data_json = json.dumps(data)
headers = {'Content-type': 'application/json'}
response = requests.post(url, data=data_json, headers=headers)
pprint.pprint(response.json())
The error I am getting below is this:
I have also deleted any files with the name of json in order to prevent the wrong imports. What does the above error mean? I tried looking up what was kwargs from the following links but did not understand.
Understanding kwargs in Python
Would appreciate any assistance.