kennethreitz/requests — Issue #462: requests.get response.content is no longer unicode in 0.10.6
Author: peczenyj
Created: 2012-02-28 18:24:35+00:00
State: open

Hi

this code:

import requests
response = requests.get("http://localhost:8888/", allow_redirects=False)
print type(response.content)

in requests=0.9.1 prints

type 'unicode'

but now, with requests=0.10.6 prints

type 'str'

it's break the backward compatibility :(

http headers for this request:

< HTTP/1.1 200 OK
< Content-Length: 1627
< Etag: "0d4a9d4d7ccb27902918a63155d797ca80389ab9"
< Content-Type: text/html; charset=UTF-8
< Server: TornadoServer/2.0