我用Python來處理釘釘?shù)慕涌?現(xiàn)在遇到一個問題,get請求都是能用的,post數(shù)據(jù)就會報(bào)500錯誤
我使用的接口是(獲取用戶待審批數(shù)量)https://open-doc.dingtalk.com...
這個可以說是沒什么有歧義的地方了,post只有一個參數(shù)
url = 'https://oapi.dingtalk.com/topapi/process/gettodonum?access_token=%s' % access_token
data = {
"userid": "manager4012"
}
headers = {
'Content-Type': 'application/json'
}
r = requests.post(url, data=json.dumps(data), headers=headers)
print(r.text)
報(bào)錯:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white"><script>
with(document)with(body)with(insertBefore(createElement("script"),firstChild))setAttribute("exparams","category=&userid=&aplus&yunid=&asid=AQAACADXmhdb3r3FKQAACACKRiLMGAxPpg==",id="tb-beacon-aplus",src="http://g.alicdn.com/alilog/mlog/aplus_v2.js")
</script>
<h1>500 Internal Server Error</h1>
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</body>
headers utf-8也指定了,json字符串也轉(zhuǎn)換了
想不懂為什么會報(bào)錯,完全沒有理由500錯誤
添加回答
舉報(bào)
0/150
提交
取消