File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/msgraph_core/requests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,20 @@ def get_response_by_id(
58
58
return response_type .create_from_discriminator_value (self ._responses .get (request_id ))
59
59
return self ._responses .get (request_id )
60
60
61
+ def get_response_stream_by_id (self , request_id : str ) -> Optional [BytesIO ]:
62
+ """
63
+ Get a response by its request ID and return the body as a stream
64
+ :param request_id: The request ID of the response to get
65
+ :type request_id: str
66
+ :return: The response Body as a stream
67
+ :rtype: io.BytesIO
68
+ """
69
+ response_item = self .get_response_by_id (request_id )
70
+ if response_item is None or response_item .body is None :
71
+ return None
72
+
73
+ return BytesIO (response_item .body )
74
+
61
75
def response (
62
76
self ,
63
77
request_id : str ,
You can’t perform that action at this time.
0 commit comments