@@ -238,6 +238,7 @@ def content(
238238 """
239239 if not file_id :
240240 raise ValueError (f"Expected a non-empty value for `file_id` but received { file_id !r} " )
241+ extra_headers = {"Accept" : "application/binary" , ** (extra_headers or {})}
241242 return self ._get (
242243 f"/files/{ file_id } /content" ,
243244 options = make_request_options (
@@ -272,7 +273,6 @@ def retrieve_content(
272273 """
273274 if not file_id :
274275 raise ValueError (f"Expected a non-empty value for `file_id` but received { file_id !r} " )
275- extra_headers = {"Accept" : "application/json" , ** (extra_headers or {})}
276276 return self ._get (
277277 f"/files/{ file_id } /content" ,
278278 options = make_request_options (
@@ -511,6 +511,7 @@ async def content(
511511 """
512512 if not file_id :
513513 raise ValueError (f"Expected a non-empty value for `file_id` but received { file_id !r} " )
514+ extra_headers = {"Accept" : "application/binary" , ** (extra_headers or {})}
514515 return await self ._get (
515516 f"/files/{ file_id } /content" ,
516517 options = make_request_options (
@@ -545,7 +546,6 @@ async def retrieve_content(
545546 """
546547 if not file_id :
547548 raise ValueError (f"Expected a non-empty value for `file_id` but received { file_id !r} " )
548- extra_headers = {"Accept" : "application/json" , ** (extra_headers or {})}
549549 return await self ._get (
550550 f"/files/{ file_id } /content" ,
551551 options = make_request_options (
0 commit comments