Skip to content

Adding CustomHosts options #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 1, 2021
Merged

Adding CustomHosts options #453

merged 7 commits into from
Jun 1, 2021

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 baywet, zengin, MIchaelMainer and ddyett 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants