更新时间:2022-01-05 19:38:39
您无需对data
进行JSON编码,因为您无需在视图中使用JSON进行任何操作.只需将您的字典直接传递到data
:
You don't need your data
to be JSON encoded, as you're not doing anything with JSON in your view. Simply pass your dictionary directly to data
:
response = requests.post(url, data=data, headers=headers)