What is the difference between 'content' and 'text'

后端 未结 2 1687
借酒劲吻你
借酒劲吻你 2020-11-29 17:45

I am using the terrific Python Requests library. I notice that the fine documentation has many examples of how to do something without explaining the why.

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 18:24

    The requests.Response class documentation has more details:

    r.text is the content of the response in Unicode, and r.content is the content of the response in bytes.

提交回复
热议问题