我正在使用soapi获取一个认证密钥,其中包含一个cookie,该cookie应该返回
from zeep import Client
client = Client("AuthenticationService.xml")
result = client.service.ValidateUser(username, password, "")
result
然而,结果是,我得到了一个布尔值True,但没有包含身份验证密钥的Cookie
从下图中,您可以看到使用SoapUI的相同请求返回一个cookie。我想知道如何在Python中实现这一点
为了能够处理
cookie
,我们必须对transport
使用requests.Session
因此,对于您来说,一个简单的用例如下所示:
希望这有帮助
相关问题 更多 >
编程相关推荐