Skip to content

Conversation

@nikithauc
Copy link
Contributor

Related to - https://github.com/microsoftgraph/msgraph-sdk-design/pull/45/files

Certain workloads error out when an unexpected header is present in the request.

Example -

In case of LargeFileUploadTask in JS library, the upload is as follows:

client.api("UPLOAD_URL").put(chunk_to_be_uploaded) 

The middleware appends request headers which are meant for the Graph API.

The solution for this is to add a check if the request URL is a Graph endpoint and not send headers to UPLOAD_URL.

Adding the headers only for Graph endpoints ignores the case where the developer might have their own test endpoints.

This PR contains changes to allow developers to provide custom endpoints and update our conditions to modify request headers.

@nikithauc nikithauc requested review from MIchaelMainer, baywet, ddyett and zengin and removed request for baywet May 12, 2021 21:30
baywet
baywet previously approved these changes May 17, 2021
@nikithauc nikithauc merged commit 62d95ea into dev Jun 1, 2021
@nikithauc nikithauc deleted the nikithauc/custom-urls branch June 1, 2021 22:53
@nikithauc nikithauc mentioned this pull request Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants