Python向Postman请求代码不起作用

2024-05-15 08:06:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我用postman从服务器获取访问令牌,它工作得很好。但是当我从postman复制python代码并在IDE中运行该代码时,会显示一些错误,比如超过了max entries。在

导入请求

{=“”网址^”

payload=“type=authoritatio&code=mycode&id=abcdefghi&client=kjsijnsui675eaa9wqksiisp” headers={'Content-Type':'application/x-www-form-urlencoded'}

响应=请求。请求(“POST”,url,data=payload,headers=headers)

打印(响应.text)在


Tags: 代码服务器idtype错误codeidepostman