Skip to content

Commit ca19ad8

Browse files
committed
consolidate json serilization of request body
1 parent 52998f2 commit ca19ad8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/msgraph_core/requests/batch_request_builder.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ async def post(
6363

6464
if isinstance(batch_request_content, BatchRequestContent):
6565
request_info = await self.to_post_request_information(batch_request_content)
66-
content = json.loads(request_info.content.decode("utf-8"))
67-
json_body = json.dumps(content)
68-
request_info.content = json_body
66+
# content = json.loads(request_info.content.decode("utf-8"))
67+
# json_body = json.dumps(content)
68+
# request_info.content = json_body
6969
error_map = error_map or self.error_map
7070
response = None
7171
try:
@@ -138,7 +138,6 @@ async def to_post_request_information(
138138
item.get_field_deserializers() for item in batch_request_content.requests
139139
]
140140
request_info.content = json.dumps({"requests": requests_dict}).encode("utf-8")
141-
142141
request_info.headers = HeadersCollection()
143142
request_info.headers.try_add("Content-Type", APPLICATION_JSON)
144143
request_info.set_content_from_parsable(

0 commit comments

Comments
 (0)