Q:

POST: Is it necessary to serialise the JSON data

My Rest API works nicely while posting JSON DATA. 
I use this on server:  
req = request.get_json()
dicti = json.loads(req)
#It(dicti) is then processed. 

On the client, I proceed like this (using python requests):  
dat = {'a':1, 'b':2}
serialised_dat = json.dumps(dat)
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
requests.post("myurl", json = serialised_dat, headers = headers)

And, everything works fine.  But, when I go to test my Rest API from other clients like insomnia,
 I get internal server error, which is fair enough because the json, I paste there, is not-serialised. 
Do I need to serialise my json and then paste it into other clients to get a success?   OR
Is the method itself, above, I use to send json to flask wrong? 

A:

The value of the json argument should be an object that will be serialized for you. 
requests.post("myurl", json=dat, headers=headers)

If you have pre-serialized data, use the data keyword argument instead. 
requests.post("myurl", data=json.dumps(dat), headers=headers)

