private MicrosoftApiResponse uploadChunk(
      DataChunk chunk, String photoUploadUrl, long totalFileSize, String mediaType)
      throws IOException, DestinationMemoryFullException, PermissionDeniedException {
    Request.Builder uploadRequestBuilder = new Request.Builder().url(photoUploadUrl);

    // put chunk data in
    RequestBody uploadChunkBody =
        RequestBody.create(MediaType.parse(mediaType), chunk.chunk(), 0, chunk.size());
    uploadRequestBuilder.put(uploadChunkBody);

    // set chunk data headers, indicating size and chunk range
    final String contentRange =
        String.format(
            "bytes %d-%d/%d", chunk.streamByteOffset(), chunk.finalByteOffset(), totalFileSize);
    uploadRequestBuilder.header("Content-Range", contentRange);
    uploadRequestBuilder.header("Content-Length", String.format("%d", chunk.size()));

    return tryWithCredsOrFail(
        uploadRequestBuilder,
        String.format(
            "uploading one chunk (%s) mediaType=%s amid %d total bytes",
            contentRange, mediaType, totalFileSize));
  }
Uploads a single DataChunk to an upload URL {@code photoUploadUrl} via PUT
request with this composition:
<pre>{@code
 HEADERS
 Content-Length: $CHUNK_SIZE_IN_BYTES
 Content-Range: bytes $BEGIN_INDEX-$END_INDEX/$TOTAL_SIZE
 body=$BYTES
}</pre>

<p>NOTE: an access token is purposely not incluced per Microsoft SDK's own instructions:
https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0#remarks


<p>See also:
<ul>
<li>https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0#upload-bytes-to-the-upload-session
</ul>

Returns a response, which is only expected to have a response-body in the
event that this is the final chunk.
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/media/MicrosoftMediaImporter.java