Skip to content

Commit 38fd368

Browse files
committed
fix: corrected content-type header check.
content type can be both `application/json` and `application/graphql-response-json` for example, so we simply check for the phrase `json` in the content-type header
1 parent b953c0b commit 38fd368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dimo/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __call__(self, headers=None, data=None, params=None, **kwargs):
5151
raise HTTPError(status=status or -1, message=str(exc), body=body)
5252

5353
content_type = response.headers.get("Content-Type", "")
54-
if "application/json" in content_type:
54+
if "json" in content_type:
5555
return response.json()
5656

5757
return response.content

0 commit comments

Comments
 (0)