BatchRequestContent
Objectives
Provide a class that makes it simple to create the payload for a Graph Batch request.
Requirements
See constraints related to all content objects.
- It MUST be possible to add native platform HTTP request objects to a BatchRequestContent object. The request URL MUST be a relative URL. Adding Graph specific Request objects MAY be supported.
- Added requests MUST be assigned unique identifiers. Those identifiers MAY be user provided or autogenerated.
- It MUST be possible to create dependencies between request objects.
- The serialized representation, written to a stream, or returned as a byte array MUST be a JSON object that conforms to the format described in the Graph Documentation and OData specification. Request bodies must be base64 encoded.
Performance Considerations
A batch cannot hold more that 20 requests and requests cannot contain a batch request payload.
Security Considerations
Requests that require additional consent, not already obtained, should not be included in a batch.
References
- [1] Graph Documentation
- [2] OData