我在用
httplib.HTTPConnection ("http://ipaddr:port")
conn.request("GET", "", params, headers)
我可以使用 ipaddr:port 使用我的 firefox 客户端进行 PUT/GET 操作!!。但是我在执行脚本时看到了这个错误:
File "post_python.py", line 5, in <module>
conn.request("GET", "", params, headers)
File "/usr/lib64/python2.6/httplib.py", line 914, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
self.endheaders()
File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
self._send_output()
File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
self.send(msg)
File "/usr/lib64/python2.6/httplib.py", line 739, in send
self.connect()
File "/usr/lib64/python2.6/httplib.py", line 720, in connect
self.timeout)
File "/usr/lib64/python2.6/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known"
请问有人可以帮我吗??