msgraph-sdk-java icon indicating copy to clipboard operation
msgraph-sdk-java copied to clipboard

Blank implementation of UploadSession.setRawObject method

Open deepesh-verma opened this issue 3 years ago • 0 comments

As mentioned in the Remarks section of the Graph API documentation for upload session -

Including the Authorization header when issuing the PUT call may result in a HTTP 401 Unauthorized response. The Authorization header and bearer token should only be sent when issuing the POST during the first step. It should be not be included when issueing the PUT.

It is evident that we don't need auth for uploading a large file to an upload session. I am trying to test it out by creating an UploadSession and then calling setRawObject with a JsonObject to set it's fields. But as the implementation is blank, it has no effect.

See - https://github.com/microsoftgraph/msgraph-sdk-java/blob/873875e7533ff3357b430c3f7092b5b926e2416f/src/main/java/com/microsoft/graph/models/UploadSession.java#L76

As we already have the json as a method parameter, we can add implementation to populate it's fields from json fields.

Any specific reason to why it is not implemented OR was it a missed TODO item?

deepesh-verma avatar Sep 27 '22 11:09 deepesh-verma