Although urlopen
does accept data
param for POST
, you can call urlopen
on a Request
object like this,
import urllib2
request = urllib2.Request('http://www.example.com', data)
response = urllib2.urlopen(request, timeout=4)
content = response.read()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…