python POST 传 flase true JSON boolean 布尔变量

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}'

猜你喜欢

转载自blog.csdn.net/x1131230123/article/details/114281396