Set Content-Type explicitly in LargeFileUploadTask.#502
Set Content-Type explicitly in LargeFileUploadTask.#502nikithauc merged 1 commit intomicrosoftgraph:devfrom
Conversation
|
@buptliuhs Thanks again for your contribution!! I will review this next week. Question for you, are you facing an error with the current code that is setting the default header to |
|
@nikithauc , No, files can be successfully uploaded even the header is set to |
Summary
In
LargefileUploadTask, setContent-Typetoapplication/octet-streamexplicitly, otherwiseapplication/jsonwill be used by default, which is not correct.Motivation
Although using the default
application/jsondoes not impact the functionality, if a client using the SDK has something likehttp-interceptorto examine the request payload, incorrectContent-Typecan be misleading, for example,application/jsonsuggestsplain/textinjsonformat.Test plan
N/A
Types of changes
Checklist