I am kind of new to Github and this is my first pull request. Let me know if I did something wrong.
I made this minor change b/c I thought it would be nice to return a native object, instead of the raw result, if the content type specifies that it is json. Figure json is common enough that convenience can be made for users of the library.
Mod. If response content-type is json, parse the result before making…