该response对象包含的信息远不仅仅是有效负载.要获取由POST请求返回的JSON数据,你必须访问response.json()所描述的例子:
response
response.json()
requestpost = requests.post(url, json=data, auth=(username, password)) response_data = requestpost.json() print(response_data["requestId"])