Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Adding CustomHosts options#453

Merged
nikithauc merged 7 commits intodevmicrosoftgraph/msgraph-sdk-javascript:devfrom
nikithauc/custom-urlsmicrosoftgraph/msgraph-sdk-javascript:nikithauc/custom-urlsCopy head branch name to clipboard
Jun 1, 2021
Merged

Adding CustomHosts options#453
nikithauc merged 7 commits intodevmicrosoftgraph/msgraph-sdk-javascript:devfrom
nikithauc/custom-urlsmicrosoftgraph/msgraph-sdk-javascript:nikithauc/custom-urlsCopy head branch name to clipboard

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
src/GraphRequestUtil.ts Show resolved Hide resolved
src/GraphRequest.ts Show resolved Hide resolved
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.