You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Batch requests are not replacing token placeholders in request URLs, resulting in bad payloads #692
# Use the request builder to generate a regular# request to /meuser_request=graph_client.me.to_get_request_information()
today=datetime.today()
tomorrow=today+timedelta(days=1)
# Use the request builder to generate a regular# request to /me/calendarview?startDateTime="start"&endDateTime="end"query_params=CalendarViewRequestBuilder.CalendarViewRequestBuilderGetQueryParameters(
start_date_time=today.isoformat(timespec='seconds'),
end_date_time=tomorrow.isoformat(timespec='seconds')
)
config=CalendarViewRequestBuilder.CalendarViewRequestBuilderGetRequestConfiguration(
query_parameters=query_params
)
events_request=graph_client.me.calendar_view.to_get_request_information(config)
# Build the batchuser_batch_item=BatchRequestItem(request_information=user_request)
events_batch_item=BatchRequestItem(request_information=events_request)
batch_request_content=BatchRequestContentCollection()
batch_request_content.add_batch_request_item(user_batch_item)
batch_request_content.add_batch_request_item(events_batch_item)
# Create batch request builder (temporary?)batch_request_builder=BatchRequestBuilder(request_adapter=graph_client.request_adapter)
batch_response=awaitbatch_request_builder.post(batch_request_content)
This results in the following payload going over the wire. Note the users/me-token-to-replace in the URLs - this should have been updated to /me.
Activity