Repository navigation
What's Changed
- Return empty JSON bodies from
Response.contentinstead of falling back to data (#177, fixes #166) — @Kulraj69
Response.content now returns the parsed JSON whenever the body is valid JSON, even if it's falsy ([], {}, 0, false, ""). Before, these came back as None. For example, downloading a file containing [] with alt="media" returned None. Note that calls whose response body is {}, such as many delete methods, now return {} instead of None. If your code checks the result with is None, check for falsiness instead (if not res:).
Full Changelog: v5.21.0...v5.22.0