I looked further at the history of some of the response methods, and this is what I can gather:
read returns raw contents (as bytes)
text returns the response as a string
dict returns the response as a dictionary
When converting to use requests, read was erroneously changed to always return a string. However, one thing worth noting is if someone is using the mechanisms in place to set data in the response object, read will be converted to a string. We should look at this further to ensure consistency, but that might break usage for others. The functionality we have in this PR is equivalent to what we had prior to moving to requests.
Fix #125
I looked further at the history of some of the response methods, and this is what I can gather:
read
returns raw contents (as bytes)text
returns the response as a stringdict
returns the response as a dictionaryWhen converting to use
requests
,read
was erroneously changed to always return a string. However, one thing worth noting is if someone is using the mechanisms in place to set data in the response object,read
will be converted to a string. We should look at this further to ensure consistency, but that might break usage for others. The functionality we have in this PR is equivalent to what we had prior to moving torequests
.