python中content什么意思_iter_content()函数具体做什么?

编程知识 更新时间:2023-04-05 05:19:42

iter_content(chunk_size=1, decode_unicode=False)

Iterates over the response data. When stream=True is set on the request, this avoids reading the content at once into memory for large responses. The chunk size is the number of bytes it should read into memory. This is not necessarily the length of each item returned as decoding can take place.

chunk_size must be of type int or None. A value of None will function differently depending on the value of stream. stream=True will read data as it arrives in whatever size the chunks are received. If stream=False, data is returned as a single chunk.

If decode_unicode is True, content will be decoded using the best available encoding based on the response.

更多推荐

python中content什么意思_iter_content()函数具体做什么?

本文发布于:2023-04-05 05:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/51b940644b2cc001b04ddde926bb509b.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:做什么   什么意思   函数   python   content

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 44976文章数
  • 14阅读数
  • 0评论数