Skip to content

Commit

Permalink
fix response handling for content types that contain `application/jso…
Browse files Browse the repository at this point in the history
…n` (#12)
  • Loading branch information
ckoegel committed May 4, 2022
1 parent 307c6cd commit da58fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Response:

def __getattr__(self, item):
if item == "body":
if self.__response.headers['Content-Type'] == 'application/json':
if 'application/json' in self.__response.headers['Content-Type']:
body = self.__response.json()
else:
body = self.__response.content
Expand Down

0 comments on commit da58fd4

Please sign in to comment.