如果您真的想使用Python处理HTTP,我强烈建议您使用Requests:HTTP for
Humans。适应您的问题的POST快速入门是:
>>> import requests>>> r = requests.post("http://bugs.python.org", data={'number': 12524, 'type': 'issue', 'action': 'show'})>>> print(r.status_pre, r.reason)200 OK>>> print(r.text[:300] + '...')<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Issue 12524: change httplib docs POST example - Python tracker</title><link rel="shortcut i...>>>


