Python 3.x 405-Robot框架中不允许使用方法
我是机器人框架的新手。我试图访问一个URL并生成一个令牌 我得到下面的错误Python 3.x 405-Robot框架中不允许使用方法,python-3.x,eclipse,pycharm,robotframework,Python 3.x,Eclipse,Pycharm,Robotframework,我是机器人框架的新手。我试图访问一个URL并生成一个令牌 我得到下面的错误 Test 1 | FAIL | 405 != 200 检查日志后 00:52:49.347 INFO POST Response : url=XXX status=405, reason=Method Not Allowed body=None URL被正确地传递,在Pos
Test 1 | FAIL |
405 != 200
检查日志后
00:52:49.347 INFO POST Response :
url=XXX
status=405, reason=Method Not Allowed
body=None
URL被正确地传递,在Postman中同样可以正常工作
Create Session myssion ${auth_url}
${response}= Post Request myssion /oauth2/token auth=${auth} headers=${headers}
grant_type=${grant_type}
Should Be Equal As Strings ${response.status_code} 200
${token}= evaluate $resp.json().get("access_token")
请帮助。问题似乎是缺少空间。在
auth=${auth}
和headers=${headers}
之间只有一个空格。您需要两个或更多空间:
${response}= Post Request myssion /oauth2/token auth=${auth} headers=${headers}
^^
你能添加你在邮递员中使用的JSON吗(删除机密后)?问题中的代码在
${auth}
和头=
之间只有一个空格。这就是你真正的代码吗?感谢bryan的帮助。在添加空间后,它现在正在工作。非常感谢。