2.2.1.10.1 Delivery of Content Requested by Fetch

Because the ItemOperations response (section 2.2.1.10) potentially contains large amounts of binary data, the client can choose a delivery method that is most efficient for its implementation by providing the following two methods for delivering the content that is requested by the Fetch element (section 2.2.3.67.1):

  • Inline

  • Multipart

The inline method of delivering binary content is including data encoded with base64 encoding inside the WBXML. The inline method generally requires the client to read the whole response into memory in order to parse it, thereby consuming a large amount of memory. The inline method is the default method for ItemOperations responses.

The multipart method of delivering content is a multipart structure with the WBXML being the first part, and the requested data populating the subsequent parts. This format enables a client to handle large files without consuming large amounts of memory, because a file is read in pieces, one piece at a time. Clients request multipart responses by including the MS-ASAcceptMultiPart header (specified in [MS-ASHTTP] section 2.2.1.1.2.5) set to "T" (TRUE) in the request.

Multipart responses have a Content-Type header with the value "application/vnd.ms-sync.multipart". The format of the body of the response is a MultiPartResponse structure, specified in section 2.2.1.10.1.1.

For an example of requesting and receiving a multipart response, see section 4.10.5.