1
我使用httplib的发送SOAP请求,但是当我把它我得到以下问题的工作与httplib的:如何使用cookie在python
INFO:root:Response:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>
我已经设置如下头:
auth = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
headers = {"Content-type": "text/xml;charset=utf-8","SOAPAction":"\"\"","Authorization": "Basic %s" % auth}
而不是python,如果我通过SoapUI发送,那么它似乎是从服务器发送SoapUI的请求时,一些cookie正在发送,然后soapUI重新发送cookie。