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(
5858 return response_type .create_from_discriminator_value (self ._responses .get (request_id ))
5959 return self ._responses .get (request_id )
6060
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+
6175 def response (
6276 self ,
6377 request_id : str ,
You can’t perform that action at this time.
0 commit comments