[虽然我使用邮差打了一个api,但它正在响应,如果我使用python脚本打了它,则出现“不允许”错误

问题描述 投票:0回答:1
`

headers = {'Cookie': Authenticationtoken.cookie, 'Content-Type': Authenticationtoken.contentType} createworkspaceurl = Authenticationtoken.BaseURL + "/workspace/create" print("API for create workspace " + createworkspaceurl) jsondata = json.dumps(PayloadConfig.createWorkspace) jsondataasbytes = jsondata.encode('utf-8') print(jsondata) response_createworkspace = requests.post(createworkspaceurl, data=jsondata, headers=headers, verify=False)

`我也在python脚本中传递相同的标头数据和相同的有效载荷,但它给出了“不允许”消息
python post postman
1个回答
0
投票
405不允许 \ r \ n

nginx \ r \ n \ r \ n \ r \ n'

© www.soinside.com 2019 - 2024. All rights reserved.