Skip to content

[SWE-bench] psf__requests-3362 #115

Description

@kkipngenokoech

Uncertain about content/text vs iter_content(decode_unicode=True/False)
When requesting an application/json document, I'm seeing next(r.iter_content(16*1024, decode_unicode=True)) returning bytes, whereas r.text returns unicode. My understanding was that both should return a unicode object. In essence, I thought "iter_content" was equivalent to "iter_text" when decode_unicode was True. Have I misunderstood something? I can provide an example if needed.

For reference, I'm using python 3.5.1 and requests 2.10.0.

Thanks!


SWE-bench instance: psf__requests-3362 Base commit: 36453b95

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai:failedPhoenix AI: run failed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions