Set the header in urllib.request python 3

怎甘沉沦 提交于 2019-12-14 04:07:57

问题


What is the meaning of body (refers to?) in the code below?

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

来源:https://stackoverflow.com/questions/38418477/set-the-header-in-urllib-request-python-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!