Skip to content

Commit 5711d4f

Browse files
committed
Enable batch request with content collection
1 parent 77603a4 commit 5711d4f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/msgraph_core/requests/batch_request_builder.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ async def _post_batch_collection(
108108

109109
for batch_request_content in batch_request_content_collection.batches:
110110
request_info = await self.to_post_request_information(batch_request_content)
111+
bytes_content = request_info.content
112+
json_content = bytes_content.decode("utf-8")
113+
updated_str = '{"requests":' + json_content + '}'
114+
updated_bytes = updated_str.encode("utf-8")
115+
request_info.content = updated_bytes
111116
response = await self._request_adapter.send_async(
112117
request_info, BatchResponseContent, error_map or self.error_map
113118
)

0 commit comments

Comments
 (0)