使用Python httplib或httpclient,我需要在HTTP客户端中使用哪些代码:
使用Keepalive消息扩展其HTTP连接?
我使用了以下代码示例,但它有两个问题:
import http.client
Connection = http.client.HTTPConnection("www.python.org")
Connection.request("HEAD", "")
response = Connection.getresponse()
print(response.status, response.reason)
答案 0 :(得分:2)