Skip to content

Commit 6581584

Browse files
chore: broadly detect json family of content-type headers
1 parent 55e4d39 commit 6581584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oxp/_response.py

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

0 commit comments

Comments
 (0)