@@ -238,6 +238,7 @@ def content(
238
238
"""
239
239
if not file_id :
240
240
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 {})}
241
242
return self ._get (
242
243
f"/files/{ file_id } /content" ,
243
244
options = make_request_options (
@@ -272,7 +273,6 @@ def retrieve_content(
272
273
"""
273
274
if not file_id :
274
275
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 {})}
276
276
return self ._get (
277
277
f"/files/{ file_id } /content" ,
278
278
options = make_request_options (
@@ -511,6 +511,7 @@ async def content(
511
511
"""
512
512
if not file_id :
513
513
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 {})}
514
515
return await self ._get (
515
516
f"/files/{ file_id } /content" ,
516
517
options = make_request_options (
@@ -545,7 +546,6 @@ async def retrieve_content(
545
546
"""
546
547
if not file_id :
547
548
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 {})}
549
549
return await self ._get (
550
550
f"/files/{ file_id } /content" ,
551
551
options = make_request_options (
0 commit comments