- 论坛徽章:
- 0
|
想用httplib发送消息,
webservice = httplib.HTTP("http://xxx.com:8180")
webservice.putrequest("POST", "/es/docs/1_0/")
webservice.endheaders()
可是在endheaders()这个地方总是抛出
Traceback (most recent call last):
File "python_soap.py", line 40, in <module>
webservice.endheaders()
File "/usr/lib/python2.6/httplib.py", line 904, in endheaders
self._send_output()
File "/usr/lib/python2.6/httplib.py", line 776, in _send_output
self.send(msg)
File "/usr/lib/python2.6/httplib.py", line 735, in send
self.connect()
File "/usr/lib/python2.6/httplib.py", line 716, in connect
self.timeout)
File "/usr/lib/python2.6/socket.py", line 500, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
这是咋回事? |
|