我收到了错误,
AttributeError: 'Request' object has no attribute 'add_data'
来自使用urllib.request的库
In Python 2.7-3.3 urllib.request contained a add_data()
method.
但是在Python 3.4中,文档说明了
如何在Python3.4中向urllib请求添加数据?
答案 0 :(得分:7)
Just assign to the data
attribute for urllib.request
.
request.data = "Some data"