-
Notifications
You must be signed in to change notification settings - Fork 494
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
Request Options : Adds fix to support injecting/appending custom headers into request via RequestOptions. #2371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR isn't specific to Client Encryption. Please update the title?
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosHeaderTests.cs
Outdated
Show resolved
Hide resolved
/// Clone RequestOptions. | ||
/// </summary> | ||
/// <returns> cloned RequestOptions. </returns> | ||
public RequestOptions ShallowCopy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed as explicit contract?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently required , so that we retain the original user passed RequestOptions ... MemberwiseClone method is protected in the Object class hence exposing ShallowCopy function and to be explicit about it being a shallow copy....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the name: @j82w are there any guidelines from central SDK team for related such?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any guideline in the central SDK team documentation.
Description
This PR focuses on adding support to inject custom headers into requests via RequestOptions. This would allow customers to directly inject custom headers. (The RequestOptions.Properties is meant for the client context and is not meant for adding headers.)
Type of change
Closing issues
To automatically close an issue: closes #2265