
47001 POST BODY 格式錯誤
一個增加集合的請求, 就是格式錯誤。 不知道該怎么搞了。怎么也查不到 該怎么進行操作了。
uj5u.com熱心網友回復:
import requests,jsonurl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=xxxxx&secret=xxxx"
res = requests.get(url)
token= res.json()
token=token["access_token"]
post_url="https://api.weixin.qq.com/tcb/databaseupdate?access_token="+token
body={
"env":"ymxsc",
"collection_name":"xxxzzz"
}
headers= {'content-type': 'application/json'}
postgo =requests.post(post_url,data=https://bbs.csdn.net/topics/json.dumps(body),headers=headers)
print(postgo.text)
這是全的代碼
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/99540.html
