Skip to content

Commit 0a09a72

Browse files
chore: broadly detect json family of content-type headers
1 parent 84dd6ba commit 0a09a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runloop_api_client/_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
235235
# split is required to handle cases where additional information is included
236236
# in the response, e.g. application/json; charset=utf-8
237237
content_type, *_ = response.headers.get("content-type", "*").split(";")
238-
if content_type != "application/json":
238+
if not content_type.endswith("json"):
239239
if is_basemodel(cast_to):
240240
try:
241241
data = response.json()

0 commit comments

Comments
 (0)