https://stackoverflow.com/questions/17980362/using-python-requests-to-send-json-boolean/17980622
You need to json encode it to get it to a string.
import json
payload = json.dumps({
"on":True})
此时:
payload就是
'{"on": true}'
https://stackoverflow.com/questions/17980362/using-python-requests-to-send-json-boolean/17980622
You need to json encode it to get it to a string.
import json
payload = json.dumps({
"on":True})
此时:
payload就是
'{"on": true}'