Skip to content

- fixes a bug where url options would be inserted twice for collection POST requests #281

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 2 commits into from
Sep 3, 2020

Conversation

baywet
Copy link
Member

@baywet baywet commented Sep 3, 2020

Summary

Because getRequestUrl already inserts the options (functions and query), providing the options again in build request was inserting those twice, causing the request to fail.

Generated code differences

microsoftgraph/msgraph-sdk-java#445

Command line arguments to run these changes

Provide the command line arguments here so that reviewers can quickly repro the results of changes.

Links to issues or work items this PR addresses

@zengin
Copy link
Contributor

zengin commented Sep 3, 2020

I understand the removal of getOptions(), but I am trying to understand addition of getHeaders().

My assumption looking at the code change is that getOptions() was adding options as well as headers, and as you replace it with getHeaders() we are only keeping headers. Is that correct?

@baywet
Copy link
Member Author

baywet commented Sep 3, 2020

yes we're only keeping the request headers. That's because getrequesturl already adds the functions and query parameters in the URL but not the headers.

Copy link
Contributor

@zengin zengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification.

@baywet baywet merged commit 68522f1 into dev Sep 3, 2020
@baywet baywet deleted the bugfix/collection-post-duplicate-options branch September 3, 2020 20:45
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.

2 participants