kennethreitz/requests — Issue #330: Returning request.content in preferred format [feature request]
Author: kracekumar
Created: 2011-12-31 17:26:35+00:00
State: open

`r = requests.get("some api which results contents in json")
type(r.content) => unicode.`

`r = requests.get("some api which results contents in json", return_format = 'json")
type(r.content) => json`

In current scenario request will return r,content in unicode format even though api results json or xml contents.
It will be easy for developer to mention return_type = 'json', so the request will convert unicode to json.

**Shortcoming: **
If the api returns xml and user specifies return_type: json it is tedious to convert. If like to like conversion is possible it will be cool feature.