在urllib.request python 3中设置标题

时间:2016-07-17 06:15:06

标签: python-3.x urllib2 urllib

下面的代码中 body (指?)的含义是什么?

headers = ['Content-length']=str(len(bytes(body, 'utf-8')))

return urllib.request.Request(theurl, bytes(body, 'utf-8'), headers)

Sourse:BadStatusLine exception raised when returning reply from server in Python 3

0 个答案:

没有答案