@@ -863,7 +863,7 @@ def _request(
863
863
self ._prepare_request (request )
864
864
865
865
try :
866
- response = self ._client .send (request , auth = self .custom_auth , stream = stream )
866
+ response = self ._client .send (request , auth = self .custom_auth , stream = stream or options . stream or False )
867
867
log .debug (
868
868
'HTTP Request: %s %s "%i %s"' , request .method , request .url , response .status_code , response .reason_phrase
869
869
)
@@ -1304,7 +1304,7 @@ async def _request(
1304
1304
await self ._prepare_request (request )
1305
1305
1306
1306
try :
1307
- response = await self ._client .send (request , auth = self .custom_auth , stream = stream )
1307
+ response = await self ._client .send (request , auth = self .custom_auth , stream = stream or options . stream or False )
1308
1308
log .debug (
1309
1309
'HTTP Request: %s %s "%i %s"' , request .method , request .url , response .status_code , response .reason_phrase
1310
1310
)
@@ -1541,6 +1541,7 @@ def make_request_options(
1541
1541
idempotency_key : str | None = None ,
1542
1542
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1543
1543
post_parser : PostParser | NotGiven = NOT_GIVEN ,
1544
+ stream : bool | None = None ,
1544
1545
) -> RequestOptions :
1545
1546
"""Create a dict of type RequestOptions without keys of NotGiven values."""
1546
1547
options : RequestOptions = {}
@@ -1562,6 +1563,9 @@ def make_request_options(
1562
1563
if idempotency_key is not None :
1563
1564
options ["idempotency_key" ] = idempotency_key
1564
1565
1566
+ if stream is not None :
1567
+ options ["stream" ] = stream
1568
+
1565
1569
if is_given (post_parser ):
1566
1570
# internal
1567
1571
options ["post_parser" ] = post_parser # type: ignore
0 commit comments