Question 1) Do we need to do json.dumps and encode before making a Python POST request?
Usually the request is:
response = requests.post('https://httpbin.org/post', json={'key':'value'})
Question 2)
Is it advisable to do like the below instead?:
x1 = {'key':'value'}
x2 = json.dumps(x1)
x3 = x2.encode()
response = requests.post('https://httpbin.org/post', json=x3)
Question 3) When do we need to do json.dumps and encode before making a Python POST request?